Exception: Confium::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Confium::Error
- Defined in:
- lib/confium/errors.rb
Direct Known Subclasses
CryptoError, IndexError, NotFoundError, ParseError, PolicyViolationError, SecureBytes::ClearedError, ThresholdError, UnresolvedSignerError, ValidationError, VerificationError
Instance Attribute Summary collapse
-
#details ⇒ Object
readonly
Returns the value of attribute details.
Instance Method Summary collapse
-
#initialize(message = nil, details: {}) ⇒ Error
constructor
A new instance of Error.
- #to_h ⇒ Object
Constructor Details
#initialize(message = nil, details: {}) ⇒ Error
Returns a new instance of Error.
15 16 17 18 |
# File 'lib/confium/errors.rb', line 15 def initialize( = nil, details: {}) @details = details.transform_keys(&:to_sym) super() end |
Instance Attribute Details
#details ⇒ Object (readonly)
Returns the value of attribute details.
13 14 15 |
# File 'lib/confium/errors.rb', line 13 def details @details end |
Instance Method Details
#to_h ⇒ Object
20 21 22 |
# File 'lib/confium/errors.rb', line 20 def to_h { class: self.class.name, message: , details: details } end |