Exception: NetStatus::Exception
- Inherits:
-
Exception
- Object
- Exception
- NetStatus::Exception
- Defined in:
- lib/net_status/exception.rb
Defined Under Namespace
Modules: Mixin
Instance Method Summary collapse
-
#initialize(net_status = {}) ⇒ Exception
constructor
A new instance of Exception.
- #message ⇒ Object
- #net_status ⇒ Object
Constructor Details
#initialize(net_status = {}) ⇒ Exception
Returns a new instance of Exception.
3 4 5 6 7 |
# File 'lib/net_status/exception.rb', line 3 def initialize(net_status={}) @net_status = net_status @net_status[:error] ||= :error super() end |
Instance Method Details
#message ⇒ Object
16 17 18 |
# File 'lib/net_status/exception.rb', line 16 def net_status_short.to_s end |
#net_status ⇒ Object
9 10 11 12 13 14 |
# File 'lib/net_status/exception.rb', line 9 def net_status @net_status.dup.tap do |res| res[:data] = (res[:data] || {}).dup res[:data][:backtrace] ||= self.backtrace end end |