Exception: MobyBase::MobyCustomError
- Defined in:
- lib/tdriver/base/errors.rb
Overview
TODO: document
Direct Known Subclasses
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(message = "") ⇒ MobyCustomError
constructor
A new instance of MobyCustomError.
Constructor Details
#initialize(message = "") ⇒ MobyCustomError
Returns a new instance of MobyCustomError.
114 115 116 117 118 119 120 121 |
# File 'lib/tdriver/base/errors.rb', line 114 def initialize( = "" ) # get backtrace from error tmp_trace = ( ( $!.nil? ) ? [] : $!.backtrace ) # add caller method to backtrace set_backtrace( ( ( caller( 2 ).nil? ) ? tmp_trace : tmp_trace.unshift( caller( 2 ).first[ /(.+):in/, 1 ] ) ) ) @message = << ( $!.nil? ? "" : ". Exception: #{ $!. }" ) super end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
113 114 115 |
# File 'lib/tdriver/base/errors.rb', line 113 def @message end |