Xj3D 2.0 VRML/X3D Code API

org.web3d.vrml.sav
Class VRMLParseException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.web3d.vrml.lang.VRMLException
                  extended by org.web3d.vrml.sav.SAVException
                      extended by org.web3d.vrml.sav.VRMLParseException
All Implemented Interfaces:
java.io.Serializable

public class VRMLParseException
extends SAVException

An exception that represents a parsing error in a VRML stream.

This is usually due to some form or syntax error. If the parser supports locators then this will also include line and column information. If they are not supported this will have values of -1 for unknown values.

Version:
$Revision: 1.4 $
Author:
Justin Couch
See Also:
Serialized Form

Constructor Summary
VRMLParseException(int line, int col)
          Create an exception that says an error occurred on the given line and column numbers.
VRMLParseException(int line, int col, java.lang.String msg)
          Create an exception that says an error occurred on the given line and column numbers and the given message.
 
Method Summary
 int getColumnNumber()
          Get the column number this exception occurred on.
 int getLineNumber()
          Get the line number this exception occurred on.
 
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

VRMLParseException

public VRMLParseException(int line,
                          int col)
Create an exception that says an error occurred on the given line and column numbers.

Parameters:
line - The line number the error occurred on
col - The column number the error occurred on

VRMLParseException

public VRMLParseException(int line,
                          int col,
                          java.lang.String msg)
Create an exception that says an error occurred on the given line and column numbers and the given message.

Parameters:
line - The line number the error occurred on
col - The column number the error occurred on
Method Detail

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.

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.

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium