dawarich/app/services/exception_reporter.rb

12 lines
267 B
Ruby
Raw Normal View History

2025-05-03 14:36:09 -04:00
# frozen_string_literal: true
class ExceptionReporter
2025-06-28 06:22:56 -04:00
def self.call(exception, human_message = nil)
2025-05-03 14:36:09 -04:00
return unless DawarichSettings.self_hosted?
2025-06-28 06:22:56 -04:00
Rails.logger.error "#{human_message}: #{exception.message}"
2025-06-26 16:05:32 -04:00
2025-05-03 14:36:09 -04:00
Sentry.capture_exception(exception)
end
end