Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raising in error_handler doesn't quit process. #23

Open
SirRawlins opened this issue Oct 11, 2017 · 0 comments
Open

Raising in error_handler doesn't quit process. #23

SirRawlins opened this issue Oct 11, 2017 · 0 comments

Comments

@SirRawlins
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant