class RbToon::ParseError
The exception class is raised when the given Toon includes errors.
Fields:
error_message-
Message string of the detected error.
position-
Position information where the error is detected.
Attributes
Read accessor to error_message field.
Read accessor to position field.
Public Class Methods
Source
# File lib/rbtoon/parse_error.rb 13 def initialize(error_message, position) 14 super(error_message) 15 @error_message = error_message 16 @position = position 17 end
Calls superclass method
Public Instance Methods
Source
# File lib/rbtoon/parse_error.rb 30 def to_s 31 (position && "#{super} -- #{position}") || super 32 end
Return the error_message string. The position information is also included if provided.
Calls superclass method