Exception: Aeternitas::Errors::Ignored

Inherits:
StandardError
  • Object
show all
Defined in:
lib/aeternitas/errors.rb

Overview

Wrapper for ignored errors. This can be used to conveniently exclude certain errors from e.g. error trackers

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(original_error) ⇒ Ignored

Create a new Instance.

Parameters:

  • original_error (StandardError)

    the wrapped error



13
14
15
16
# File 'lib/aeternitas/errors.rb', line 13

def initialize(original_error)
  @original_error = original_error
  super("#{original_error.class} - #{original_error.message}")
end

Instance Attribute Details

#original error(error) ⇒ Object (readonly)

the wrapped error



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/aeternitas/errors.rb', line 7

class Ignored < StandardError
  attr_reader :original_error

  # Create a new Instance.
  #
  # @param [StandardError] original_error the wrapped error
  def initialize(original_error)
    @original_error = original_error
    super("#{original_error.class} - #{original_error.message}")
  end

end

#original_errorObject (readonly)

Returns the value of attribute original_error.



8
9
10
# File 'lib/aeternitas/errors.rb', line 8

def original_error
  @original_error
end