javax.datamining
Class JDMException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.datamining.JDMException
All Implemented Interfaces:
JDMErrorCodes, java.io.Serializable
Direct Known Subclasses:
ConnectionFailureException, IncompatibleSpecificationException, InvalidObjectException, InvalidURIException, TaskException

public class JDMException
extends java.lang.Exception
implements JDMErrorCodes

The class JDMException extends java.lang.Exception to indicate conditions that a reasonable application might want to catch. It has subclasses to provide more sophisticated exception handling. JDM API throws only JDMException to support applications with varying degree of exception handling.

The subclasses of JDMException includes the following.

Note that JDM also supports two runtime exceptions. The class JDMUnsupportedFeatureException extends java.lang.UnsupportedOperationException, and JDMIllegalArgumentException inherits from java.lang.IllegalArgumentException.

The error codes are divided into two categories: errors for checked exceptions (i.e., JDMException and its subclasses) and erros for runtime exceptions (i.e., JDMUnsupportedFeatureException and JDMIllegalArgumentException). The error codes for checked exceptions range between 1000 and 1499, and the ones for runetime exceptions between 1500 and 1999. Error codes between 0 and 999 are reserved for JDM and error codes between 2000 and 9999 are reserved for vendor extension.

Refer to JDMErrorCodes for error codes.

Author:
JSR-73 Expert Group
See Also:
JDMErrorCodes, Exception, Serialized Form

Field Summary
 
Fields inherited from interface javax.datamining.JDMErrorCodes
JDM_CONNECTION_CLOSE_FAILED, JDM_CONNECTION_FAILURE, JDM_CONNECTION_OPEN_FAILED, JDM_DUPLICATE_ENTRY, JDM_ENTRY_NOT_FOUND, JDM_GENERIC_ERROR, JDM_INACCESSIBLE_URI, JDM_INCOMPATIBLE_ARGUMENT_SPECIFICATION, JDM_INCOMPATIBLE_SPECIFICATION, JDM_INVALID_SETTINGS, JDM_INVALID_URI, JDM_INVALID_USAGE, JDM_OBJECT_EXISTS, JDM_OBJECT_NOT_FOUND, JDM_RESERVED_1005, JDM_TASK_EXECUTING, JDM_TASK_FAILED, JDM_TASK_NOT_EXECUTING, JDM_VENDOR_SPECIFIC_ERROR_CODE_BEGIN, JDM_VENDOR_SPECIFIC_ERROR_CODE_END, JDMR_ARRAY_MISMATCH, JDMR_ARRAY_SIZE_EXCEEDED, JDMR_INVALID_ARGUMENT, JDMR_INVALID_CLASS_NAME, JDMR_INVALID_DATA_TYPE, JDMR_INVALID_OBJECT, JDMR_INVALID_OBJECT_TYPE, JDMR_INVALID_STRING_ARGUMENT, JDMR_NULL_ARGUMENT, JDMR_RUNTIME_GENERIC_ERROR, JDMR_STRING_TOO_LONG, JDMR_UNSUPPORTED_FEATURE
 
Constructor Summary
JDMException()
          Creates an instance of JDMException.
JDMException(int errorCode, java.lang.String errorMessage)
          Creates an instance of JDMException with the specified message and error code.
JDMException(int errorCode, java.lang.String errorMessage, int vendorCode, java.lang.String vendorMessage)
          Creates an instance of JDMException with the specified message and error code together with the vendor specific error code and message.
 
Method Summary
 int getErrorCode()
          Returns the JDM error code of this exception.
 int getVendorErrorCode()
          Returns the vendor-specific error code of the exception.
 java.lang.String getVendorErrorMessage()
          Returns the vendor-specific error message of the exception.
 
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JDMException

public JDMException()
Creates an instance of JDMException. The error message defaults to null and the error code to JDM_GENERIC_ERROR.


JDMException

public JDMException(int errorCode,
                    java.lang.String errorMessage)
Creates an instance of JDMException with the specified message and error code.

Parameters:
errorCode - An integer to indicate the cause of the exception
errorMessage - A message that describes the exception

JDMException

public JDMException(int errorCode,
                    java.lang.String errorMessage,
                    int vendorCode,
                    java.lang.String vendorMessage)
Creates an instance of JDMException with the specified message and error code together with the vendor specific error code and message.

Parameters:
errorCode - An integer to indicate the cause of the exception
errorMessage - A message that describes the exception
vendorCode - A vendor specific number to indicate the cause of the exception
vendorMessage - A vendor specific message that describes the exception
Method Detail

getErrorCode

public int getErrorCode()
Returns the JDM error code of this exception. Returns 0 if no error code has been set.

Returns:
Integer - The JDM error code

getVendorErrorCode

public int getVendorErrorCode()
Returns the vendor-specific error code of the exception. Returns 0 if no vendor error code has been set.

Returns:
Integer - The vendor-specific error code

getVendorErrorMessage

public java.lang.String getVendorErrorMessage()
Returns the vendor-specific error message of the exception.

Returns:
String - The vendor-specific error message