Class: Ruote::ErrorHandler::RaisedError
- Inherits:
-
Object
- Object
- Ruote::ErrorHandler::RaisedError
- Defined in:
- lib/ruote/svc/error_handler.rb
Overview
The ‘raise’ action/msg passes deflated errors. This wrapper class “inflates” them.
Instance Method Summary collapse
- #backtrace ⇒ Object
- #class ⇒ Object
-
#initialize(h) ⇒ RaisedError
constructor
A new instance of RaisedError.
- #message ⇒ Object
- #to_s ⇒ Object (also: #inspect)
Constructor Details
#initialize(h) ⇒ RaisedError
Returns a new instance of RaisedError.
172 173 174 |
# File 'lib/ruote/svc/error_handler.rb', line 172 def initialize(h) @h = h end |
Instance Method Details
#backtrace ⇒ Object
181 182 183 |
# File 'lib/ruote/svc/error_handler.rb', line 181 def backtrace @h['trace'] end |
#class ⇒ Object
175 176 177 |
# File 'lib/ruote/svc/error_handler.rb', line 175 def class Ruote.constantize(@h['class']) end |
#message ⇒ Object
178 179 180 |
# File 'lib/ruote/svc/error_handler.rb', line 178 def @h['message'] end |
#to_s ⇒ Object Also known as: inspect
184 185 186 |
# File 'lib/ruote/svc/error_handler.rb', line 184 def to_s "raised: #{@h['class']}: #{@h['message']}" end |