Exception: Citrus::SyntaxError

Inherits:
Error show all
Defined in:
lib/citrus.rb

Overview

Raised when Citrus::File.parse fails.

Instance Method Summary collapse

Constructor Details

#initialize(error) ⇒ SyntaxError

The error given here is an instance of Citrus::ParseError.



162
163
164
165
166
167
# File 'lib/citrus.rb', line 162

def initialize(error)
  message = "Malformed Citrus syntax on line #{error.line_number}"
  message << " at offset #{error.line_offset}\n#{error.detail}"

  super(message)
end