error_handler: log error before error_intercepted
error_handler: log error before error_intercepted

logging the error before emitting the "error_intercepted" msg
fixes tests that wait_for("error_intercepted")

ConsultingMD/ruote,jmettraux/ruote,ConsultingMD/ruote,jmettraux/ruote