Exception: Mamertes::Error
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- Mamertes::Error
- Defined in:
- lib/mamertes/application.rb
Overview
This exception is raised when something goes wrong.
Instance Attribute Summary collapse
-
#message ⇒ String
readonly
A human readable message.
-
#reason ⇒ Symbol
readonly
The reason of failure.
-
#target ⇒ Object
readonly
The target of this error.
Instance Method Summary collapse
-
#initialize(target, reason, message) ⇒ Error
constructor
Initializes a new error.
Constructor Details
#initialize(target, reason, message) ⇒ Error
Initializes a new error
27 28 29 30 31 32 33 |
# File 'lib/mamertes/application.rb', line 27 def initialize(target, reason, ) super() @target = target @reason = reason = end |
Instance Attribute Details
#message ⇒ String (readonly)
Returns A human readable message.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/mamertes/application.rb', line 17 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 = end end |
#reason ⇒ Symbol (readonly)
Returns The reason of failure.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/mamertes/application.rb', line 17 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 = end end |
#target ⇒ Object (readonly)
Returns The target of this error.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/mamertes/application.rb', line 17 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 = end end |