Exception: Bovem::Errors::Error
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- Bovem::Errors::Error
- Defined in:
- lib/bovem/errors.rb
Overview
This exception is raised when something goes wrong.
Instance Attribute Summary (collapse)
-
- (String) message
readonly
A human readable message.
-
- (Symbol) reason
readonly
The reason of failure.
-
- (Object) target
readonly
The target of this error.
Instance Method Summary (collapse)
-
- (Error) initialize(target, reason, message)
constructor
Initializes a new error.
Constructor Details
- (Error) initialize(target, reason, message)
Initializes a new error
36 37 38 39 40 41 42 |
# File 'lib/bovem/errors.rb', line 36 def initialize(target, reason, ) super() @target = target @reason = reason @message = end |
Instance Attribute Details
- (String) message (readonly)
Returns A human readable message.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/bovem/errors.rb', line 26 class Error < ArgumentError attr_reader :target attr_reader :reason attr_reader :message # Initializes a new error # # @param target [Object] The target of this error. # @param reason [Symbol] The reason of failure. # @param message [String] A human readable message. def initialize(target, reason, ) super() @target = target @reason = reason @message = end end |
- (Symbol) reason (readonly)
Returns The reason of failure.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/bovem/errors.rb', line 26 class Error < ArgumentError attr_reader :target attr_reader :reason attr_reader :message # Initializes a new error # # @param target [Object] The target of this error. # @param reason [Symbol] The reason of failure. # @param message [String] A human readable message. def initialize(target, reason, ) super() @target = target @reason = reason @message = end end |
- (Object) target (readonly)
Returns The target of this error.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/bovem/errors.rb', line 26 class Error < ArgumentError attr_reader :target attr_reader :reason attr_reader :message # Initializes a new error # # @param target [Object] The target of this error. # @param reason [Symbol] The reason of failure. # @param message [String] A human readable message. def initialize(target, reason, ) super() @target = target @reason = reason @message = end end |