Exception: Stark::Exception
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Stark::Exception
- Defined in:
- lib/stark/exception.rb
Instance Method Summary collapse
-
#initialize(fields_or_msg = nil) ⇒ Exception
constructor
A new instance of Exception.
Constructor Details
#initialize(fields_or_msg = nil) ⇒ Exception
Returns a new instance of Exception.
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/stark/exception.rb', line 3 def initialize(fields_or_msg = nil) case fields_or_msg when Hash fields_or_msg.each do |k,v| send(:"#{k}=", v) if respond_to?(:"#{k}=") end when nil fields_or_msg = "A remote exception occurred" end super end |