class HRX::ParseError

An error caused by an HRX file failing to parse correctly.

Attributes

column[R]

The 1-based column of the line on which the error occurred.

file[R]

The file which failed to parse, or `nil` if the filename isn't known.

line[R]

The 1-based line of the document on which the error occurred.

Public Class Methods

new(message, line, column, file: nil) click to toggle source
Calls superclass method
# File lib/hrx/parse_error.rb, line 28
def initialize(message, line, column, file: nil)
  super(message)
  @line = line
  @column = column
  @file = file
end

Public Instance Methods

to_s() click to toggle source
# File lib/hrx/parse_error.rb, line 35
def to_s
  buffer = String.new("Parse error on line #{line}, column #{column}")
  buffer << " of #{file}" if file
  buffer << ": #{super.to_s}"
end