add exception listener.