Module: LogStruct::Integrations::GoodJob::LogThreadErrors
- Extended by:
- T::Sig
- Defined in:
- lib/log_struct/integrations/good_job.rb
Overview
Logs each thread error as a structured line, then calls the handler the app set as
on_thread_error (GoodJob's README sets one to report errors to an error tracker). Every
GoodJob component passes its thread errors to GoodJob._on_thread_error, so this works
whenever the app sets its handler: GoodJob's engine applies config.good_job.on_thread_error
after LogStruct's setup. GoodJob passes any Exception its handled_exceptions setting lets
through, not only StandardErrors.
Instance Method Summary collapse
Instance Method Details
#_on_thread_error(exception) ⇒ void
This method returns an undefined value.
93 94 95 96 97 98 99 100 |
# File 'lib/log_struct/integrations/good_job.rb', line 93 def _on_thread_error(exception) LogStruct::Integrations::GoodJob.log_thread_error(exception) rescue => e LogStruct.handle_exception(e, source: LogStruct::Source::Internal, context: {integration: :good_job}) ensure # The app's handler runs even if LogStruct's line failed super end |