Sha256: 642754794bf16f982e865095a5b9d6a4edd684e1dad795ceb603d8ca315cf6e7
Contents?: true
Size: 697 Bytes
Versions: 7
Compression:
Stored size: 697 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
7 entries across 7 versions & 1 rubygems