Exception: DjiMqttConnect::Error
- Inherits:
-
StandardError
- Object
- StandardError
- DjiMqttConnect::Error
- Defined in:
- lib/dji_mqtt_connect/error.rb
Overview
Represents an Error caused when communicatng via MQTT
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(error, message = nil) ⇒ Error
constructor
A new instance of Error.
- #inspect ⇒ Object
Constructor Details
#initialize(error, message = nil) ⇒ Error
Returns a new instance of Error.
8 9 10 11 |
# File 'lib/dji_mqtt_connect/error.rb', line 8 def initialize(error, = nil) @wrapped_exception, msg = (error, ) super(msg) end |
Instance Attribute Details
#wrapped_exception ⇒ Object (readonly)
Returns the value of attribute wrapped_exception.
6 7 8 |
# File 'lib/dji_mqtt_connect/error.rb', line 6 def wrapped_exception @wrapped_exception end |
Instance Method Details
#backtrace ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/dji_mqtt_connect/error.rb', line 13 def backtrace if @wrapped_exception @wrapped_exception.backtrace else super end end |
#inspect ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/dji_mqtt_connect/error.rb', line 21 def inspect if @wrapped_exception inner = +"" inner += ": #{}," if !.empty? && @wrapped_exception. != inner << " wrapped=#{@wrapped_exception.inspect}" %(#<#{self.class}#{inner}>) else super end end |