Exception: Wukong::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Wukong::Error
- Defined in:
- lib/wukong.rb
Overview
A common error class intended to be raised by code within Wukong or its plugins.
Instance Method Summary collapse
-
#initialize(msg_or_error) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(msg_or_error) ⇒ Error
Returns a new instance of Error.
26 27 28 29 30 31 32 |
# File 'lib/wukong.rb', line 26 def initialize msg_or_error if msg_or_error.respond_to?(:message) && msg_or_error.respond_to?(:backtrace) super([msg_or_error., msg_or_error.backtrace].compact.join("\n")) else super(msg_or_error) end end |