Module: ErrorTrack
- Defined in:
- lib/error_track.rb,
lib/error_track/engine.rb,
lib/error_track/version.rb,
lib/error_track/notifier.rb,
lib/error_track/middleware.rb,
lib/error_track/configuration.rb,
app/models/error_track/occurrence.rb,
app/models/error_track/error_event.rb,
app/models/error_track/application_record.rb,
app/controllers/error_track/errors_controller.rb,
lib/generators/error_track/install/install_generator.rb
Defined Under Namespace
Modules: Generators Classes: ApplicationRecord, Configuration, Engine, ErrorEvent, ErrorsController, Middleware, Notifier, Occurrence, RailsErrorSubscriber
Constant Summary collapse
- VERSION =
"0.1.0"
Class Method Summary collapse
- .configuration ⇒ Object
- .configure {|configuration| ... } ⇒ Object
-
.notify(exception, context: {}) ⇒ Object
Public API for manually reporting a rescued exception.
Class Method Details
.configuration ⇒ Object
9 10 11 |
# File 'lib/error_track.rb', line 9 def configuration @configuration ||= Configuration.new end |
.configure {|configuration| ... } ⇒ Object
13 14 15 |
# File 'lib/error_track.rb', line 13 def configure yield(configuration) end |
.notify(exception, context: {}) ⇒ Object
Public API for manually reporting a rescued exception.
begin
risky_call
rescue => e
ErrorTrack.notify(e, context: { user_id: current_user.id })
end
24 25 26 |
# File 'lib/error_track.rb', line 24 def notify(exception, context: {}) Notifier.new.call(exception, context: context) end |