[framework] refactor exception listener

closes #127