Class: Atatus::Error::Exception Private
- Inherits:
-
Object
- Object
- Atatus::Error::Exception
- Defined in:
- lib/atatus/error/exception.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- MOD_SPLIT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'::'
Instance Attribute Summary collapse
- #attributes ⇒ Object private
- #cause ⇒ Object private
- #code ⇒ Object private
- #handled ⇒ Object private
- #message ⇒ Object private
- #module ⇒ Object private
- #stacktrace ⇒ Object private
- #type ⇒ Object private
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attrs = nil) ⇒ Exception
constructor
private
A new instance of Exception.
- #inspect ⇒ Object private
Constructor Details
#initialize(attrs = nil) ⇒ Exception
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Exception.
26 27 28 29 30 31 32 |
# File 'lib/atatus/error/exception.rb', line 26 def initialize(attrs = nil) return unless attrs attrs.each do |key, val| send(:"#{key}=", val) end end |
Instance Attribute Details
#attributes ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
43 44 45 |
# File 'lib/atatus/error/exception.rb', line 43 def attributes @attributes end |
#cause ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
43 44 45 |
# File 'lib/atatus/error/exception.rb', line 43 def cause @cause end |
#code ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
43 44 45 |
# File 'lib/atatus/error/exception.rb', line 43 def code @code end |
#handled ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
43 44 45 |
# File 'lib/atatus/error/exception.rb', line 43 def handled @handled end |
#message ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
43 44 45 |
# File 'lib/atatus/error/exception.rb', line 43 def @message end |
#module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
43 44 45 |
# File 'lib/atatus/error/exception.rb', line 43 def module @module end |
#stacktrace ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
43 44 45 |
# File 'lib/atatus/error/exception.rb', line 43 def stacktrace @stacktrace end |
#type ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
43 44 45 |
# File 'lib/atatus/error/exception.rb', line 43 def type @type end |
Class Method Details
.from_exception(exception, **attrs) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
34 35 36 37 38 39 40 41 |
# File 'lib/atatus/error/exception.rb', line 34 def self.from_exception(exception, **attrs) new({ message: exception..to_s, type: exception.class.to_s, module: format_module(exception), cause: exception.cause && Exception.from_exception(exception.cause) }.merge(attrs)) end |
Instance Method Details
#inspect ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
54 55 56 57 58 59 |
# File 'lib/atatus/error/exception.rb', line 54 def inspect '<Atatus::Error::Exception' \ " type:#{type}" \ " message:#{}" \ '>' end |