Capture exceptions and emit as log messages.