Exception: Johnson::Parser::SyntaxError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Johnson::Parser::SyntaxError
- Defined in:
- lib/johnson/parser/syntax_error.rb
Instance Attribute Summary collapse
-
#file_name ⇒ Object
Returns the value of attribute file_name.
-
#line_number ⇒ Object
Returns the value of attribute line_number.
-
#message ⇒ Object
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(message, file_name, line_number) ⇒ SyntaxError
constructor
A new instance of SyntaxError.
Constructor Details
#initialize(message, file_name, line_number) ⇒ SyntaxError
Returns a new instance of SyntaxError.
5 6 7 8 9 10 |
# File 'lib/johnson/parser/syntax_error.rb', line 5 def initialize(, file_name, line_number) super("#{} in (#{file_name || "nil"}): #{line_number}") @message = @file_name = file_name @line_number = line_number end |
Instance Attribute Details
#file_name ⇒ Object
Returns the value of attribute file_name.
4 5 6 |
# File 'lib/johnson/parser/syntax_error.rb', line 4 def file_name @file_name end |
#line_number ⇒ Object
Returns the value of attribute line_number.
4 5 6 |
# File 'lib/johnson/parser/syntax_error.rb', line 4 def line_number @line_number end |
#message ⇒ Object
Returns the value of attribute message.
4 5 6 |
# File 'lib/johnson/parser/syntax_error.rb', line 4 def @message end |