Class TokenMgrError
java.lang.Object
java.lang.Throwable
java.lang.Error
org.tweetyproject.logics.rpcl.parser.rpclcondensedprobabilitydistributionparser.TokenMgrError
-
Constructor Summary
ConstructorDescriptionNo arg constructor.TokenMgrError
(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) Constructs aTokenMgrError
with detailed information about the lexical error.TokenMgrError
(String message, int reason) Constructs aTokenMgrError
with a specified error message and reason code. -
Method Summary
Modifier and TypeMethodDescriptionYou can also modify the body of this method to customize your error messages.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
TokenMgrError
public TokenMgrError()No arg constructor. -
TokenMgrError
Constructs aTokenMgrError
with a specified error message and reason code.- Parameters:
message
- A description of the error.reason
- An integer code representing the type of error.
-
TokenMgrError
public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) Constructs aTokenMgrError
with detailed information about the lexical error.- Parameters:
EOFSeen
- A boolean indicating if the end-of-file was seen during the error.lexState
- An integer representing the lexical state when the error occurred.errorLine
- An integer indicating the line number where the error occurred.errorColumn
- An integer indicating the column number where the error occurred.errorAfter
- A string representing the text after which the error occurred.curChar
- The character that was being processed when the error occurred.reason
- An integer code representing the type of error.
-
-
Method Details
-
getMessage
You can also modify the body of this method to customize your error messages. For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not of end-users concern, so you can return something like : "Internal Error : Please file a bug report .... " from this method for such cases in the release version of your parser.- Overrides:
getMessage
in classThrowable
-