Class: Errbit::Client
- Inherits:
-
Object
- Object
- Errbit::Client
- Defined in:
- lib/errbit/client.rb
Constant Summary collapse
- NETWORK_ERRORS =
[ Errno::ECONNREFUSED, Errno::ECONNRESET, Errno::EHOSTUNREACH, SocketError, Timeout::Error, Net::OpenTimeout, Net::ReadTimeout, OpenSSL::SSL::SSLError ].freeze
Instance Method Summary collapse
-
#initialize(configuration) ⇒ Client
constructor
A new instance of Client.
- #notify(exception) ⇒ Object
Constructor Details
#initialize(configuration) ⇒ Client
Returns a new instance of Client.
20 21 22 |
# File 'lib/errbit/client.rb', line 20 def initialize(configuration) @configuration = configuration end |
Instance Method Details
#notify(exception) ⇒ Object
24 25 26 27 28 29 |
# File 'lib/errbit/client.rb', line 24 def notify(exception) return Result.ignored if configuration.ignored?(exception) configuration.validate! deliver(ErrorReport.build(exception)) end |