Log exceptions when a handler fails.