Skip to content

Idea: ensure rake integration is enabled when rescue_rake_exceptions is true #292

@Nitrodist

Description

@Nitrodist

I ran into a bit of an issue where I thought I had enabled the rake integration in my ruby project but it turns out that airbrake wasn't sending the exceptions to airbrake (even though I had airbrake required and rescue_rake_exceptions was set true).

As it turns out (and in the cucumber spec), one must require airbrake/rake_handler for it to work. Without this required, then the exceptions won't be sent to Airbrake (silently not sending).

Given the nature of rake tasks, I think that if the setting for rescuing from rake exceptions is set to true, then we should ensure that the rake integration is enabled via one or two ways:

  1. Raise an exception at run-time if the airbrake/rake_handler isn't loaded when rescue_rake_exceptions is set to true
  2. Automatically load airbrake/rake_handler after rescue_rake_exceptions is enabled.

I'm willing to do the work to get this going, but I'd like to know which one is the appropriate way to do it before working on it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions