Exception: Croudia::Error::NetworkError
- Inherits:
-
Croudia::Error
- Object
- StandardError
- Croudia::Error
- Croudia::Error::NetworkError
- Defined in:
- lib/croudia/error.rb
Overview
Error connecting to server
Direct Known Subclasses
Instance Attribute Summary collapse
-
#wrapped_exception ⇒ Object
readonly
Returns the value of attribute wrapped_exception.
Instance Method Summary collapse
- #backtrace ⇒ Object
-
#initialize(e) ⇒ NetworkError
constructor
A new instance of NetworkError.
Constructor Details
#initialize(e) ⇒ NetworkError
Returns a new instance of NetworkError.
8 9 10 11 |
# File 'lib/croudia/error.rb', line 8 def initialize(e) @wrapped_exception = e super(e.respond_to?(:message) ? e. : e.to_s) end |
Instance Attribute Details
#wrapped_exception ⇒ Object (readonly)
Returns the value of attribute wrapped_exception.
6 7 8 |
# File 'lib/croudia/error.rb', line 6 def wrapped_exception @wrapped_exception end |
Instance Method Details
#backtrace ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/croudia/error.rb', line 13 def backtrace if @wrapped_exception.respond_to?(:backtrace) @wrapped_exception.backtrace else super end end |