Exception: Openphar::Errors::ParseError
- Inherits:
-
Openphar::Error
- Object
- StandardError
- Openphar::Error
- Openphar::Errors::ParseError
- Defined in:
- lib/openphar/errors/parse_error.rb
Overview
Raised when parsing fails.
Instance Attribute Summary collapse
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(source, details = nil) ⇒ ParseError
constructor
A new instance of ParseError.
Constructor Details
#initialize(source, details = nil) ⇒ ParseError
Returns a new instance of ParseError.
9 10 11 12 13 14 15 |
# File 'lib/openphar/errors/parse_error.rb', line 9 def initialize(source, details = nil) @source = source @details = details = "Failed to parse: #{source}" += " - #{details}" if details super() end |
Instance Attribute Details
#details ⇒ Object (readonly)
Returns the value of attribute details.
7 8 9 |
# File 'lib/openphar/errors/parse_error.rb', line 7 def details @details end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
7 8 9 |
# File 'lib/openphar/errors/parse_error.rb', line 7 def source @source end |