org.xquark.xml.xdbc
Class XMLDBCException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.xquark.xml.xdbc.XMLDBCException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
XMLDBCNotRecognizedException, XMLDBCNotSupportedException

public class XMLDBCException
extends java.lang.Exception

This class describes a XMLDBC (Xml DataBase Connectivity) exception for various use in XMLDBC API.
All other specific XMLDBC exceptions extend this exception.

See Also:
Serialized Form

Field Summary
protected  int errorCode
          The error code of this exception.
protected  java.lang.Throwable exception
          The underlying exception (or error) of this exception.
static int LOAD_TOO_HIGH
          Error code for server with too high a load
static int NO_CODE
          Error code for exception that have no associated error code.
static int PERMISSION_DENIED
          Error code for illegal attempt to do something on data source
 
Constructor Summary
XMLDBCException(int code)
          Constructor with error code.
XMLDBCException(int code, java.lang.String msg)
          Constructor with error code and message.
XMLDBCException(int code, java.lang.String msg, java.lang.Throwable exception)
          Constructor with error code, message and underlying exception.
XMLDBCException(java.lang.String msg)
          Constructor with message.
XMLDBCException(java.lang.String msg, java.lang.Throwable exception)
          Constructor with message and underlying exception.
 
Method Summary
 int getCode()
          To get the code of this exception/error.
 java.lang.Throwable getException()
          To get the exception of this exception/error.
 java.lang.String getMessage()
          Returns the exception message, or the embedded exception message if none is present
 void printStackTrace()
           
 void printStackTrace(java.io.PrintStream ps)
           
 void printStackTrace(java.io.PrintWriter pw)
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_CODE

public static final int NO_CODE
Error code for exception that have no associated error code.

See Also:
Constant Field Values

LOAD_TOO_HIGH

public static final int LOAD_TOO_HIGH
Error code for server with too high a load

See Also:
Constant Field Values

PERMISSION_DENIED

public static final int PERMISSION_DENIED
Error code for illegal attempt to do something on data source

See Also:
Constant Field Values

errorCode

protected int errorCode
The error code of this exception.


exception

protected java.lang.Throwable exception
The underlying exception (or error) of this exception.

Constructor Detail

XMLDBCException

public XMLDBCException(int code)
Constructor with error code.

Parameters:
code - the code featuring the kind of error (see constants).

XMLDBCException

public XMLDBCException(java.lang.String msg)
Constructor with message.

Parameters:
msg - a message to describe the exception.

XMLDBCException

public XMLDBCException(int code,
                       java.lang.String msg)
Constructor with error code and message.

Parameters:
code - the code featuring the kind of error (see constants).
msg - a message to describe the exception.

XMLDBCException

public XMLDBCException(java.lang.String msg,
                       java.lang.Throwable exception)
Constructor with message and underlying exception.

Parameters:
msg - a message to describe the exception.
exception - the underlying exception (or error).

XMLDBCException

public XMLDBCException(int code,
                       java.lang.String msg,
                       java.lang.Throwable exception)
Constructor with error code, message and underlying exception.

Parameters:
code - the code featuring the kind of error (see constants).
msg - a message to describe the exception.
exception - the underlying exception (or error).
Method Detail

getCode

public int getCode()
To get the code of this exception/error.

Returns:
the error code.

getException

public java.lang.Throwable getException()
To get the exception of this exception/error.

Returns:
the underlying exception.

getMessage

public java.lang.String getMessage()
Returns the exception message, or the embedded exception message if none is present

Overrides:
getMessage in class java.lang.Throwable
Returns:
the message

printStackTrace

public void printStackTrace()
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintWriter pw)
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream ps)
Overrides:
printStackTrace in class java.lang.Throwable


Copyright © 2004 Université de Versailles Saint-Quentin, XQuark Group. All rights reserved.