Module: Exceptions

Defined in:
lib/exceptions.rb,
lib/exceptions/result.rb,
lib/exceptions/backend.rb,
lib/exceptions/version.rb,
lib/exceptions/backends/null.rb,
lib/exceptions/configuration.rb,
lib/exceptions/backends/multi.rb,
lib/exceptions/backends/logger.rb,
lib/exceptions/backends/raiser.rb,
lib/exceptions/backends/context.rb,
lib/exceptions/backends/log_result.rb,
lib/exceptions/backends/honeybadger.rb

Defined Under Namespace

Modules: Backends Classes: Backend, BadResult, Configuration, Result

Constant Summary collapse

VERSION =
'0.1.0'

Class Method Summary collapse

Class Method Details

.clear_contextObject

Public: Clear the context.

Returns nothing.



40
41
42
# File 'lib/exceptions.rb', line 40

def clear_context
  backend.clear_context
end

.configurationObject

Public: The configuration object.

Returns a Configuration instance.



47
48
49
# File 'lib/exceptions.rb', line 47

def configuration
  @configuration ||= Configuration.new
end

.configure {|configuration| ... } ⇒ Object

Public: Configure the configuration.

Yields the Configuration object.

Yields:



54
55
56
# File 'lib/exceptions.rb', line 54

def configure
  yield configuration
end

.context(ctx) ⇒ Object

Public: Set the context.

Returns nothing.



33
34
35
# File 'lib/exceptions.rb', line 33

def context(ctx)
  backend.context ctx
end

.notify(exception, options = {}) ⇒ Object

Public: Forwards the exception to the configured backend.

exception - An Exception object. options - A Hash of options to pass to the backend.

Returns a Result object.



26
27
28
# File 'lib/exceptions.rb', line 26

def notify(exception, options = {})
  backend.notify exception, options
end