Sha256: 0a0fffe727a0a9d5381ff9f37313fa1c110eebda6666cf34c436786b03869687
Contents?: true
Size: 698 Bytes
Versions: 13
Compression:
Stored size: 698 Bytes
Contents
module TestTrack::MisconfigurationNotifier class Wrapper attr_reader :underlying def initialize(underlying = Null.new) @underlying = underlying end def notify(msg) raise msg if Rails.env.development? Rails.logger.error(msg) underlying.notify(msg) end end class Null def notify(_); end end class Airbrake def notify(msg) raise "Aibrake was configured but not found" unless defined?(::Airbrake) if ::Airbrake.respond_to?(:notify_or_ignore) ::Airbrake.notify_or_ignore(StandardError.new, error_message: msg) else ::Airbrake.notify(StandardError.new, error_message: msg) end end end end
Version data entries
13 entries across 13 versions & 1 rubygems