clockwork
clockwork copied to clipboard
Raising in error_handler doesn't quit process.
I'm running clockwork using clockwork lib/clock.rb and have a custom error_handler which reraises the exception in development, or quietly logs to Sentry.io in staging/production.
#
# Implement a custom error handler to track clockwork
# error events into Sentry via Raven.
#
error_handler do |exception|
# Throw these direct in development so that we
# can see and action them sooner.
if Rails.env.development?
# Raise the exception again.
raise exception
else
# Log the error to Sentry via Raven.
Raven.capture_exception(exception)
end
end
However, despite what the README suggests this doesn't appear to break/stop the process and display the error in the console, it instead just carries on quietly.
Any suggestions on how to work around this? Would ideally like error_handler to break things in development when hitting errors.