Exception: Smartdown::Parser::ParseError
- Inherits:
-
StandardError
- Object
- StandardError
- Smartdown::Parser::ParseError
- Defined in:
- lib/smartdown/parser/flow_interpreter.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#parse_error ⇒ Object
readonly
Returns the value of attribute parse_error.
Instance Method Summary collapse
-
#initialize(filename, parse_error) ⇒ ParseError
constructor
A new instance of ParseError.
- #to_s(full = true) ⇒ Object
Constructor Details
#initialize(filename, parse_error) ⇒ ParseError
Returns a new instance of ParseError.
9 10 11 12 |
# File 'lib/smartdown/parser/flow_interpreter.rb', line 9 def initialize(filename, parse_error) @filename = filename @parse_error = parse_error end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
7 8 9 |
# File 'lib/smartdown/parser/flow_interpreter.rb', line 7 def filename @filename end |
#parse_error ⇒ Object (readonly)
Returns the value of attribute parse_error.
7 8 9 |
# File 'lib/smartdown/parser/flow_interpreter.rb', line 7 def parse_error @parse_error end |
Instance Method Details
#to_s(full = true) ⇒ Object
14 15 16 |
# File 'lib/smartdown/parser/flow_interpreter.rb', line 14 def to_s(full = true) "Parse error in '#{filename}':\n\n" + @parse_error.cause.ascii_tree end |