Class: Confium::ParseError
- Inherits:
-
Error
- Object
- Error
- Confium::ParseError
- Defined in:
- lib/confium/errors/parse_error.rb
Overview
Raised when input cannot be parsed (bad JSON, malformed PEM, etc.).
Instance Attribute Summary collapse
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
Instance Method Summary collapse
-
#initialize(message = nil, details_hash = nil, **kwargs) ⇒ ParseError
constructor
A new instance of ParseError.
Constructor Details
#initialize(message = nil, details_hash = nil, **kwargs) ⇒ ParseError
Returns a new instance of ParseError.
7 8 9 10 11 12 |
# File 'lib/confium/errors/parse_error.rb', line 7 def initialize( = nil, details_hash = nil, **kwargs) , kwargs = Confium::Errors::Coerce.args(, details_hash, kwargs) @format = kwargs.delete(:format) @offset = kwargs.delete(:offset) super(, details: { format: @format, offset: @offset, **kwargs }) end |
Instance Attribute Details
#format ⇒ Object (readonly)
Returns the value of attribute format.
5 6 7 |
# File 'lib/confium/errors/parse_error.rb', line 5 def format @format end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
5 6 7 |
# File 'lib/confium/errors/parse_error.rb', line 5 def offset @offset end |