Class: Logux::ErrorRenderer
- Inherits:
-
Object
- Object
- Logux::ErrorRenderer
- Defined in:
- lib/logux/error_renderer.rb
Instance Attribute Summary collapse
-
#exception ⇒ Object
readonly
Returns the value of attribute exception.
Instance Method Summary collapse
-
#initialize(exception) ⇒ ErrorRenderer
constructor
A new instance of ErrorRenderer.
- #message ⇒ Object
Constructor Details
#initialize(exception) ⇒ ErrorRenderer
Returns a new instance of ErrorRenderer.
7 8 9 |
# File 'lib/logux/error_renderer.rb', line 7 def initialize(exception) @exception = exception end |
Instance Attribute Details
#exception ⇒ Object (readonly)
Returns the value of attribute exception.
5 6 7 |
# File 'lib/logux/error_renderer.rb', line 5 def exception @exception end |
Instance Method Details
#message ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/logux/error_renderer.rb', line 11 def case exception when Logux::WithMetaError (exception, exception..id) when Logux::UnauthorizedError (exception, exception.) when StandardError # some runtime error that should be fixed render_stardard_error(exception) end end |