Package gov.nih.mipav.model.scripting
Class ParserException
java.lang.Object
java.lang.Throwable
java.lang.Exception
gov.nih.mipav.model.scripting.ParserException
- All Implemented Interfaces:
Serializable
Provides information about an error encountered while parsing a script.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intThe line number in the script where this error occurred.private StringThe file name of the script where this error occurred ('-' if no corresponding file on disk).private static final longUse serialVersionUID for interoperability. -
Constructor Summary
ConstructorsConstructorDescriptionParserException(String message) Creates a new ParserException object.ParserException(String file, int line, String message) Creates a new ParserException object. -
Method Summary
Modifier and TypeMethodDescriptionintReturn the line number in the script where the problem occurred.Return the file that the script was read in from ('-' if no file on disk).voidsetLineNumber(int line) Changes the line number in the script where the problem happened.voidsetParsedFileName(String file) Changes the file from which the script was read in ('-' if no file on disk).toString()Converts the information contained in this exception to a String suitable for display to the user.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
lineNumber
private int lineNumberThe line number in the script where this error occurred. -
parsedFileName
The file name of the script where this error occurred ('-' if no corresponding file on disk).
-
-
Constructor Details
-
ParserException
Creates a new ParserException object. Defaults the error occurring on line 0 of non-file '-'.- Parameters:
message- A message describing the problem.
-
ParserException
Creates a new ParserException object.- Parameters:
file- The file the script was read in from on disk ('-' if no file).line- The line in the script where the problem happened.message- A message describing the problem.
-
-
Method Details
-
getLineNumber
public int getLineNumber()Return the line number in the script where the problem occurred.- Returns:
- The line number in the script where the problem occurred.
-
getParsedFileName
Return the file that the script was read in from ('-' if no file on disk).- Returns:
- The file that the script was read in from.
-
setLineNumber
public void setLineNumber(int line) Changes the line number in the script where the problem happened.- Parameters:
line- The line number in the script with the error.
-
setParsedFileName
Changes the file from which the script was read in ('-' if no file on disk).- Parameters:
file- The file from which the script was read in.
-
toString
Converts the information contained in this exception to a String suitable for display to the user.
-