Exception: Cfoo::Parser::ElParseError
- Inherits:
-
ParseError
- Object
- RuntimeError
- ParseError
- Cfoo::Parser::ElParseError
- Defined in:
- lib/cfoo/parser.rb
Instance Attribute Summary collapse
-
#cause ⇒ Object
Returns the value of attribute cause.
-
#column ⇒ Object
Returns the value of attribute column.
-
#file_name ⇒ Object
Returns the value of attribute file_name.
-
#line ⇒ Object
Returns the value of attribute line.
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(file_name, cause, source, line, column) ⇒ ElParseError
constructor
A new instance of ElParseError.
Constructor Details
#initialize(file_name, cause, source, line, column) ⇒ ElParseError
Returns a new instance of ElParseError.
106 107 108 109 110 111 112 113 114 |
# File 'lib/cfoo/parser.rb', line 106 def initialize(file_name, cause, source, line, column) super("Failed to parse '#{file_name}':\nLocation: #{file_name} line #{line}, column #{column} \nSource: #{source}\nCause: #{cause.ascii_tree}") @file_name = file_name @cause = cause @source = source @line = line @column = column end |
Instance Attribute Details
#cause ⇒ Object
Returns the value of attribute cause.
104 105 106 |
# File 'lib/cfoo/parser.rb', line 104 def cause @cause end |
#column ⇒ Object
Returns the value of attribute column.
104 105 106 |
# File 'lib/cfoo/parser.rb', line 104 def column @column end |
#file_name ⇒ Object
Returns the value of attribute file_name.
104 105 106 |
# File 'lib/cfoo/parser.rb', line 104 def file_name @file_name end |
#line ⇒ Object
Returns the value of attribute line.
104 105 106 |
# File 'lib/cfoo/parser.rb', line 104 def line @line end |
#source ⇒ Object
Returns the value of attribute source.
104 105 106 |
# File 'lib/cfoo/parser.rb', line 104 def source @source end |