Exception: Kybus::Exceptions::AntBaseException
- Inherits:
-
StandardError
- Object
- StandardError
- Kybus::Exceptions::AntBaseException
- Defined in:
- lib/kybus/exceptions.rb
Overview
Exception used as standard error on this gem.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(message, code, data) ⇒ AntBaseException
constructor
A new instance of AntBaseException.
- #to_h ⇒ Object
- #to_log_format ⇒ Object
Constructor Details
#initialize(message, code, data) ⇒ AntBaseException
Returns a new instance of AntBaseException.
20 21 22 23 24 |
# File 'lib/kybus/exceptions.rb', line 20 def initialize(, code, data) @message = @code = code @data = data end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
19 20 21 |
# File 'lib/kybus/exceptions.rb', line 19 def code @code end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
19 20 21 |
# File 'lib/kybus/exceptions.rb', line 19 def data @data end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
19 20 21 |
# File 'lib/kybus/exceptions.rb', line 19 def @message end |
Instance Method Details
#to_h ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/kybus/exceptions.rb', line 30 def to_h { message: , code: code, data: data, backtrace: backtrace } end |
#to_log_format ⇒ Object
26 27 28 |
# File 'lib/kybus/exceptions.rb', line 26 def to_log_format to_h.merge(class: self.class.name) end |