dbXML API

## org.dbxml.core
Class FaultCodes

    java.lang.Object
      |
      +--org.dbxml.core.FaultCodes

All Implemented Interfaces:
  FaultCodes, FaultCodesOperations, org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object, java.io.Serializable

public abstract class FaultCodes
extends java.lang.Object
implements FaultCodes

FaultCodes defines the dbXML specific fault codes and associated error messages.

See Also:
  Serialized Form

Fields inherited from interface org.dbxml.core.corba.db.FaultCodes

`COL, COL_CANNOT_CREATE, COL_CANNOT_DROP, COL_CANNOT_RETRIEVE, COL_CANNOT_STORE, COL_COLLECTION_CLOSED, COL_COLLECTION_NOT_FOUND, COL_COLLECTION_READ_ONLY, COL_DOCUMENT_MALFORMED, COL_DOCUMENT_NOT_FOUND, COL_DUPLICATE_COLLECTION, COL_NO_FILER, COL_NO_INDEXMANAGER, COL_NULL_RESULT, DBE, DBE_CANNOT_DROP, DBE_NO_PARENT, GEN, GEN_CRITICAL_ERROR, GEN_FATAL_ERROR, GEN_GENERAL_ERROR, GEN_UNKNOWN, IDX, IDX_CANNOT_CREATE, IDX_CORRUPTED, IDX_DUPLICATE_INDEX, IDX_INDEX_NOT_FOUND, IDX_MATCHES_NOT_FOUND, IDX_NOT_SUPPORTED, IDX_STYLE_NOT_FOUND, IDX_VALUE_NOT_FOUND, JAVA, JAVA_RUNTIME_ERROR, OBJ, OBJ_CANNOT_CREATE, OBJ_CLASS_FORMAT_ERROR, OBJ_DUPLICATE_OBJECT, OBJ_INVALID_CONTEXT, OBJ_INVALID_RESULT, OBJ_METHOD_NOT_FOUND, OBJ_NULL_RESULT, OBJ_OBJECT_NOT_FOUND, OBJ_RUNTIME_EXCEPTION, QRY, QRY_COMPILATION_ERROR, QRY_NOT_SUPPORTED, QRY_NULL_RESULT, QRY_PROCESSING_ERROR, QRY_STYLE_NOT_FOUND, SEC, SEC_INVALID_ACCESS, SEC_INVALID_CREDENTIALS, SEC_INVALID_GROUP, SEC_INVALID_USER, TRX, TRX_DOC_LOCKED, TRX_NO_CONTEXT, TRX_NOT_ACTIVE, TRX_NOT_SUPPORTED, URI, URI_EMPTY, URI_NULL, URI_PARSE_ERROR`

Method Summary
`static APIException` `createAPIException(java.lang.Exception e)` createAPIException creates an APIException instance based on the specified Exception.
`static APIException` `createAPIException(int code)` createAPIException creates an APIException instance based on the specified parameters.
`static APIException` `createAPIException(int code, java.lang.String message)` createAPIException creates an APIException instance based on the specified parameters.
`static XMLDBException` `createXMLDBException(java.lang.Exception e)` createXMLDBException creates an XMLDBException instance based on the specified Exception.
`static int` `getFaultCode(java.lang.Exception e)` getFaultCode examines the provided exception to determine the fault code that is associated with it.
`static int` `getFaultCodeSeries(java.lang.Exception e)` getFaultCodeSeries examines the provided exception to determine the fault code series that is associated with it.
`static int` `getFaultCodeType(java.lang.Exception e)` getFaultCodeType examines the provided exception to determine the general fault code that is associated with it.
`static java.lang.String` `getFaultMessage(java.lang.Exception e)` getFaultMessage examines the provided exception to determine the fault message that is associated with it.
`static java.lang.String` `getMessage(int code)` getMessage returns a textual form for the specified fault code.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.omg.CORBA.Object
`_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override`

Method Detail

### getMessage

    public static java.lang.String getMessage(int code)

  getMessage returns a textual form for the specified fault code.
  Parameters:
    `code` - The Fault Code
  Returns:
    It's textual form

### createAPIException

    public static APIException createAPIException(int code)

  createAPIException creates an APIException instance based on the specified parameters.
  Parameters:
    `code` - The Fault Code
  Returns:
    An APIException instance

### createAPIException

    public static APIException createAPIException(int code,
                                                  java.lang.String message)

  createAPIException creates an APIException instance based on the specified parameters.
  Parameters:
    `code` - The Fault Code
    `message` - A specific message to associate
  Returns:
    An APIException instance

### createAPIException

    public static APIException createAPIException(java.lang.Exception e)

  createAPIException creates an APIException instance based on the specified Exception. If the Exception is a DBException, it will extract any important information from it (like fault codes and messages)
  Parameters:
    `e` - The Exception to use
  Returns:
    An APIException instance

### createXMLDBException

    public static XMLDBException createXMLDBException(java.lang.Exception e)

  createXMLDBException creates an XMLDBException instance based on the specified Exception. If the Exception is a DBException, it will extract any important information from it (like fault codes and messages)
  Parameters:
    `e` - The Exception to use
  Returns:
    An XMLDBException instance

### getFaultCodeType

    public static int getFaultCodeType(java.lang.Exception e)

  getFaultCodeType examines the provided exception to determine the general fault code that is associated with it. General fault codes are reduced from actual fault codes to be one of the GEN_ prefixed fault code values.
  Parameters:
    `e` - The Exception to examine
  Returns:
    The General Fault Code

### getFaultCodeSeries

    public static int getFaultCodeSeries(java.lang.Exception e)

  getFaultCodeSeries examines the provided exception to determine the fault code series that is associated with it. Series are reduced from actual fault codes to be one of the fault code prefixes (ex: COL, DB, SEC).
  Parameters:
    `e` - The Exception to examine
  Returns:
    The Fault Code Series

### getFaultCode

    public static int getFaultCode(java.lang.Exception e)

  getFaultCode examines the provided exception to determine the fault code that is associated with it.
  Parameters:
    `e` - The Exception to examine
  Returns:
    The Fault Code

### getFaultMessage

    public static java.lang.String getFaultMessage(java.lang.Exception e)

  getFaultMessage examines the provided exception to determine the fault message that is associated with it.
  Parameters:
    `e` - The Exception to examine
  Returns:
    The Fault Message

dbXML API

Copyright (c) 1999-2001 The dbXML Group, All rights reserved