Exception: Dms::DecodeError

Inherits:
StandardError
  • Object
show all
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

Instance Method Summary collapse

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, message)
  @line   = line
  @column = column
  @text   = message
  super("#{line}:#{column}: #{message}")
end

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column.



18
19
20
# File 'lib/dms/types.rb', line 18

def column
  @column
end

#lineObject (readonly)

Returns the value of attribute line.



18
19
20
# File 'lib/dms/types.rb', line 18

def line
  @line
end

#textObject (readonly)

Returns the value of attribute text.



18
19
20
# File 'lib/dms/types.rb', line 18

def text
  @text
end