net.aethersanctum.curlyml
Class SyntaxException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by net.aethersanctum.curlyml.SyntaxException
All Implemented Interfaces:
java.io.Serializable

public class SyntaxException
extends java.lang.Exception

Gets thrown by the Parser or the Scanner if either of them encounter something they can't deal with.

Author:
ben
See Also:
Serialized Form

Nested Class Summary
static class SyntaxException.Reason
          a code explaining what went wrong.
 
Constructor Summary
SyntaxException(SyntaxException.Reason r, int line, int column)
          SyntaxExceptions must be created with a reason why parsing failed, as well as a location in the input stream indicating where the failure occurred (which can be gotten from the Scanner).
 
Method Summary
 SyntaxException.Reason getReason()
          obtain the reason why the parsing failed.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SyntaxException

public SyntaxException(SyntaxException.Reason r,
                       int line,
                       int column)
SyntaxExceptions must be created with a reason why parsing failed, as well as a location in the input stream indicating where the failure occurred (which can be gotten from the Scanner).

Parameters:
r -
line -
column -
Method Detail

getReason

public SyntaxException.Reason getReason()
obtain the reason why the parsing failed.

Returns: