com.virtualweaver.xotics.datamodel
Class XoException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bycom.virtualweaver.xotics.datamodel.XoException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
XoLockedException, XoRedirectException, XoValidityException

public class XoException
extends java.lang.Exception

Main XO core exception. Used by all core elements to throw system exceptions.

Version:
4.1
See Also:
Serialized Form

Field Summary
static short ADD_ERROR
          Error occurred during Xo Object adding in DM instance.
static short DMI_LOCKED
          Occurs when DM instance is accessed by a thread while its locked by another thread
static short DMI_NOT_OWNER
          Occurs when DM instance attempts to manipulate an Xo object belonging to another DM instance
static short DMI_RELEASED
          Occurs when attempting to use a released DM instance
static short DMM_LOAD
          When an error occurred during DM module load/unload.
static short ILLEGAL_ARGUMENT
          When argument specified is not valid (i.e. null object).
static short INVALID_DATAMODEL
          This data-model is invalid.
static short INVALID_OBJECT
          When an Xo object or derived or PropertyEditor is not valid.
static short NO_SUCH_DATAMODEL
          This data-model is unknown.
static short NO_SUCH_OBJECT
          Xo object or Property editor not found.
static short NOT_REQUESTABLE
          Occurs when DM instance is XPath requested but instace is created in basic mode
static short OBJECT_NOT_WELCOME
          When an Xo object to add as child is not accepted by target parent.
static short READ_ONLY
          Occurs when an attempt to add/remove nodes in a DM instance is made when in read only mode.
static short ROOT_MOVE
          Occurs when an attempt to (re)move root object is made.
static short THROWABLE_OCCURRED
          When a Throwable is intercepted in code.
static short UNKNOWN_REASON
          When the reason of this exception is not specified.
static short VALIDITY_CHECKING
          When a DM instance is not XML valid.
static short XPATH_REQUEST_COMPUTING
          Occurs when an error occurs during XPath request processing
static short XPATH_REQUEST_PARSING
          Occurs when an error occurs during XPath parsing
 
Constructor Summary
XoException(short reason, java.lang.String details)
          Constructor.
XoException(java.lang.String id, short reason, java.lang.String details)
          Constructor.
 
Method Summary
 java.lang.String getId()
          Returns the ID to localize error in source code.
 short getReason()
          Returns the reason of error.
 java.lang.String toString()
          Returns a String representation of this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNKNOWN_REASON

public static final short UNKNOWN_REASON
When the reason of this exception is not specified.

See Also:
Constant Field Values

ILLEGAL_ARGUMENT

public static final short ILLEGAL_ARGUMENT
When argument specified is not valid (i.e. null object).

See Also:
Constant Field Values

OBJECT_NOT_WELCOME

public static final short OBJECT_NOT_WELCOME
When an Xo object to add as child is not accepted by target parent.

See Also:
Constant Field Values

VALIDITY_CHECKING

public static final short VALIDITY_CHECKING
When a DM instance is not XML valid.

See Also:
Constant Field Values

INVALID_OBJECT

public static final short INVALID_OBJECT
When an Xo object or derived or PropertyEditor is not valid.

See Also:
Constant Field Values

THROWABLE_OCCURRED

public static final short THROWABLE_OCCURRED
When a Throwable is intercepted in code.

See Also:
Constant Field Values

DMM_LOAD

public static final short DMM_LOAD
When an error occurred during DM module load/unload.

See Also:
Constant Field Values

NO_SUCH_DATAMODEL

public static final short NO_SUCH_DATAMODEL
This data-model is unknown.

See Also:
Constant Field Values

INVALID_DATAMODEL

public static final short INVALID_DATAMODEL
This data-model is invalid.

See Also:
Constant Field Values

ADD_ERROR

public static final short ADD_ERROR
Error occurred during Xo Object adding in DM instance.

See Also:
Constant Field Values

NO_SUCH_OBJECT

public static final short NO_SUCH_OBJECT
Xo object or Property editor not found.

See Also:
Constant Field Values

READ_ONLY

public static final short READ_ONLY
Occurs when an attempt to add/remove nodes in a DM instance is made when in read only mode.

See Also:
Constant Field Values

ROOT_MOVE

public static final short ROOT_MOVE
Occurs when an attempt to (re)move root object is made.

See Also:
Constant Field Values

DMI_NOT_OWNER

public static final short DMI_NOT_OWNER
Occurs when DM instance attempts to manipulate an Xo object belonging to another DM instance

See Also:
Constant Field Values

DMI_LOCKED

public static final short DMI_LOCKED
Occurs when DM instance is accessed by a thread while its locked by another thread

See Also:
Constant Field Values

NOT_REQUESTABLE

public static final short NOT_REQUESTABLE
Occurs when DM instance is XPath requested but instace is created in basic mode

See Also:
Constant Field Values

XPATH_REQUEST_PARSING

public static final short XPATH_REQUEST_PARSING
Occurs when an error occurs during XPath parsing

See Also:
Constant Field Values

XPATH_REQUEST_COMPUTING

public static final short XPATH_REQUEST_COMPUTING
Occurs when an error occurs during XPath request processing

See Also:
Constant Field Values

DMI_RELEASED

public static final short DMI_RELEASED
Occurs when attempting to use a released DM instance

See Also:
Constant Field Values
Constructor Detail

XoException

public XoException(short reason,
                   java.lang.String details)
Constructor.

Parameters:
reason - the reason code defining this exception among those defined in this class
details - a description of this exception

XoException

public XoException(java.lang.String id,
                   short reason,
                   java.lang.String details)
Constructor.

Parameters:
id - a string id to localize error in source code
reason - the reason code defining this exception among those defined in this class
details - a description of this exception
Method Detail

getId

public java.lang.String getId()
Returns the ID to localize error in source code.

Returns:
id a string id to localize error in source code

getReason

public short getReason()
Returns the reason of error.

Returns:
the reason code defining this exception among those defined in this class

toString

public java.lang.String toString()
Returns a String representation of this exception.

Returns:
a string representation of this exception