Exception: Dms::DecodeError
- Inherits:
-
StandardError
- Object
- StandardError
- Dms::DecodeError
- Defined in:
- lib/dms/types.rb
Overview
Raised by ‘Dms.decode*` on malformed source. Carries the (line, column) of the first offending byte plus the bare error text.
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(line, column, message) ⇒ DecodeError
constructor
A new instance of DecodeError.
Constructor Details
#initialize(line, column, message) ⇒ DecodeError
Returns a new instance of DecodeError.
20 21 22 23 24 25 |
# File 'lib/dms/types.rb', line 20 def initialize(line, column, ) @line = line @column = column @text = super("#{line}:#{column}: #{}") end |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column.
18 19 20 |
# File 'lib/dms/types.rb', line 18 def column @column end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
18 19 20 |
# File 'lib/dms/types.rb', line 18 def line @line end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
18 19 20 |
# File 'lib/dms/types.rb', line 18 def text @text end |