Package org.web3d.vrml.lang
Class InvalidFieldFormatException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.web3d.vrml.lang.VRMLException
org.web3d.vrml.lang.FieldException
org.web3d.vrml.lang.InvalidFieldFormatException
- All Implemented Interfaces:
Serializable
Exception for when the format provided by the field is invalid for what
the field requires.
The exception also has the option of including line and column number information for when it is generated from a file that was read. If the field was parsed from a non-file source, such as the SAI, then no number information will be present and the two getter methods will return a value of -1.
- Version:
- $Revision: 1.4 $
- Author:
- Justin Couch
- See Also:
-
Field Summary
Fields inherited from class org.web3d.vrml.lang.FieldException
fieldName
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new exception with no message.Create a new exception with a message.InvalidFieldFormatException
(String msg, int lineNumber, int columnNumber) Create a new exception with a message and the name of the field that had the error.InvalidFieldFormatException
(String msg, int lineNumber, int columnNumber, String field) Create a new exception with a message and the name of the field that had the error.InvalidFieldFormatException
(String msg, String field) Create a new exception with a message and the name of the field that had the error. -
Method Summary
Modifier and TypeMethodDescriptionint
Get the column number this exception occurred on.int
Get the line number this exception occurred on.void
setColumnNumber
(int columnNumber) Get the column number this exception occurred on.void
setLineNumber
(int lineNumber) Get the line number this exception occurred on.Methods inherited from class org.web3d.vrml.lang.FieldException
getFieldName, setFieldName
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidFieldFormatException
public InvalidFieldFormatException()Create a new exception with no message. -
InvalidFieldFormatException
Create a new exception with a message.- Parameters:
msg
- The message associated with this exception
-
InvalidFieldFormatException
-
InvalidFieldFormatException
Create a new exception with a message and the name of the field that had the error.- Parameters:
msg
- The message associated with this exceptionlineNumber
- The line number the error occurred oncolumnNumber
- The column number the error occurred on
-
InvalidFieldFormatException
Create a new exception with a message and the name of the field that had the error.- Parameters:
msg
- The message associated with this exceptionlineNumber
-columnNumber
-field
- The name of the field with the error
-
-
Method Details
-
setLineNumber
public void setLineNumber(int lineNumber) Get the line number this exception occurred on. If the original parser did not support line numbers this returns -1;- Parameters:
lineNumber
- The line number the error was on.
-
getLineNumber
public int getLineNumber()Get the line number this exception occurred on. If the original parser did not support line numbers this returns -1;- Returns:
- The line number the error was on.
-
setColumnNumber
public void setColumnNumber(int columnNumber) Get the column number this exception occurred on. If the original parser did not support column numbers this returns -1;- Parameters:
columnNumber
- The column number the error was on.
-
getColumnNumber
public int getColumnNumber()Get the column number this exception occurred on. If the original parser did not support column numbers this returns -1;- Returns:
- The column number the error was on.
-