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

Do not report SignalExceptions in at_exit handler #477

Closed
wants to merge 1 commit into from

Commits on Jul 20, 2018

  1. Do not report SignalExceptions in at_exit handler

    The previous behaviour resulted in applications reporting errors even
    though they were gracefully and without any problems shut down. Example:
    the puma webserver relies on `SIGTERM` to gracefully shut down its
    workers and Bugsnag reported errors when it was normally shut down.
    
    For more information on puma's behaviour, see here:
    
        puma/puma#1438
    
    With the `at_exit` handler introduced in bugsnag#397, Bugsnag would catch
    `SignalExceptions` on exit and report them as error, even though they
    are none.
    
    This PR changes the existing behaviour to add `SignalException` as a
    special case in which the exception should not be passed to
    `Bugsnag.notify`.
    
    Due to the Ruby exiting when a `SignalException` is raised I had to
    refactor the code to make the actual handling of the exit-exceptions
    testable without the test suite quitting.
    mrnugget committed Jul 20, 2018
    Configuration menu
    Copy the full SHA
    817dc77 View commit details
    Browse the repository at this point in the history