Xj3D VRML/X3D Code API

org.web3d.vrml.lang
Class InvalidFieldAccessException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byorg.web3d.vrml.lang.VRMLException
                  extended byorg.web3d.vrml.lang.FieldException
                      extended byorg.web3d.vrml.lang.InvalidFieldAccessException
All Implemented Interfaces:
java.io.Serializable

public class InvalidFieldAccessException
extends FieldException

Exception indicating that a field accessType violation has occurred.

This is generated when a field is modifed/read outside its field access paramaters. Typically an initializeOnly field is written to.

Version:
$Revision: 1.2 $
Author:
Alan Hudson
See Also:
Serialized Form

Constructor Summary
InvalidFieldAccessException()
          Create a new exception with no message.
InvalidFieldAccessException(java.lang.String msg)
          Create a new exception with a message.
InvalidFieldAccessException(java.lang.String msg, java.lang.String field)
          Create a new exception with a message and the name of the field that had the error.
InvalidFieldAccessException(java.lang.String field, VRMLNode node)
          Create a new exception for dealing with an invalid field access value.
 
Method Summary
 java.lang.String getFieldName()
          Get the name of the field that generated this exception.
 void setFieldName(java.lang.String field)
          Set the name of the field that caused this error.
 
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

InvalidFieldAccessException

public InvalidFieldAccessException()
Create a new exception with no message.


InvalidFieldAccessException

public InvalidFieldAccessException(java.lang.String msg)
Create a new exception with a message.

Parameters:
msg - The message associated with this exception

InvalidFieldAccessException

public InvalidFieldAccessException(java.lang.String msg,
                                   java.lang.String field)
Create a new exception with a message and the name of the field that had the error.

Parameters:
msg - The message associated with this exception
field - The name of the field with the error

InvalidFieldAccessException

public InvalidFieldAccessException(java.lang.String field,
                                   VRMLNode node)
Create a new exception for dealing with an invalid field access value.

Parameters:
field - The index of the field being set
node - The node that we are getting the field set in
Method Detail

setFieldName

public void setFieldName(java.lang.String field)
Set the name of the field that caused this error. Used only by the code that generated the exception if the format error and field names are kept in two separate places.

Parameters:
field - The name of the field with the error

getFieldName

public java.lang.String getFieldName()
Get the name of the field that generated this exception. It may or may not be set, depending on the underlying implementation. If not set, this will return null;

Returns:
The name of the field with the invalid error

Xj3D VRML/X3D Code API

Copyright © 2001 - 2005 Web3D Consortium