oracle.jdeveloper.cm
Class CMException
java.lang.Object
java.lang.Throwable
java.lang.Exception
oracle.jdeveloper.cm.CMException
- All Implemented Interfaces:
- java.io.Serializable
- public class CMException
- extends java.lang.Exception
The CMException
class is designed generally to be a wrapper class. That is, exceptions which ConnectionManager
encounters during the course of processing (with the exception of java.io.IOException
) are usually wrapped within this class. This allows the ConnectionManager
API to remain a little more simple. Users do not need to concern themselves with the myriad of different exceptions which can be thrown to the underlying connection methodologies unless they wish to.
- See Also:
- Serialized Form
Field Summary |
protected java.lang.Exception |
exception
The exception we are wrapping. |
Constructor Summary |
CMException(java.lang.Exception exception)
Wraps the specified exception as a CMException |
CMException(java.lang.String err)
Constructs a CMException which is not a wrapper, but rather simply contains a message. |
Method Summary |
java.lang.String |
getMessage()
returns a String representing the error message contained within this exception. |
boolean |
isWrapper()
returns whether this CMException wraps another exception. |
java.lang.Exception |
unwrap()
returns the wrapped exception. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
exception
protected java.lang.Exception exception
- The exception we are wrapping.
CMException
public CMException(java.lang.String err)
- Constructs a
CMException
which is not a wrapper, but rather simply contains a message.
- Parameters:
err
- the error message associated with this exception
- See Also:
Throwable.Throwable(java.lang.String)
CMException
public CMException(java.lang.Exception exception)
- Wraps the specified exception as a
CMException
- Parameters:
exception
- the exception to be wrapped
isWrapper
public boolean isWrapper()
- returns whether this
CMException
wraps another exception.
-
- Returns:
- a boolean describing whether this wraps another exception.
unwrap
public java.lang.Exception unwrap()
- returns the wrapped exception.
-
- Returns:
- the wrapped exception
- See Also:
Exception
getMessage
public java.lang.String getMessage()
- returns a String representing the error message contained within this exception. If this is a wrapped exception, it unwraps the exception to extract the wrapped message. In the case of
java.sql.SQLException
, this method also processes any chained exceptions.
-
- Returns:
- a String representing the error message
- See Also:
Throwable.getMessage()
, SQLException
Copyright © 1997, 2004, Oracle. All rights reserved.