com.caucho.naming
Class NamingExceptionWrapper

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by javax.naming.NamingException
              extended by com.caucho.naming.NamingExceptionWrapper
All Implemented Interfaces:
ExceptionWrapper, java.io.Serializable

public class NamingExceptionWrapper
extends javax.naming.NamingException
implements ExceptionWrapper

Wraps the actual exception with a Naming exception

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.naming.NamingException
remainingName, resolvedName, resolvedObj, rootException
 
Constructor Summary
NamingExceptionWrapper()
          Null constructor for beans
NamingExceptionWrapper(java.lang.String msg)
          Create a basic NamingExceptionWrapper with a message.
NamingExceptionWrapper(java.lang.Throwable rootCause)
          Create a NamingExceptionWrapper wrapping a root exception.
 
Method Summary
 java.lang.Throwable getCause()
          Returns the root exception if it exists.
 java.lang.String getMessage()
          Returns the appropriate exception message.
 java.lang.Throwable getRootCause()
          Returns the root exception if it exists.
 void printStackTrace()
          Prints the stack trace, preferring the root cause if it exists.
 void printStackTrace(java.io.PrintStream os)
          Prints the stack trace, preferring the root cause if it exists.
 void printStackTrace(java.io.PrintWriter os)
          Prints the stack trace, preferring the root cause if it exists.
 java.lang.String toString()
          Print the exception as a string.
 
Methods inherited from class javax.naming.NamingException
appendRemainingComponent, appendRemainingName, getExplanation, getRemainingName, getResolvedName, getResolvedObj, initCause, setRemainingName, setResolvedName, setResolvedObj, setRootCause, toString
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NamingExceptionWrapper

public NamingExceptionWrapper()
Null constructor for beans


NamingExceptionWrapper

public NamingExceptionWrapper(java.lang.String msg)
Create a basic NamingExceptionWrapper with a message.

Parameters:
msg - the exception message.

NamingExceptionWrapper

public NamingExceptionWrapper(java.lang.Throwable rootCause)
Create a NamingExceptionWrapper wrapping a root exception.

Parameters:
rootCause - the underlying wrapped exception.
Method Detail

getRootCause

public java.lang.Throwable getRootCause()
Returns the root exception if it exists.

Specified by:
getRootCause in interface ExceptionWrapper
Overrides:
getRootCause in class javax.naming.NamingException
Returns:
the underlying wrapped exception.

getCause

public java.lang.Throwable getCause()
Returns the root exception if it exists.

Overrides:
getCause in class javax.naming.NamingException
Returns:
the underlying wrapped exception.

getMessage

public java.lang.String getMessage()
Returns the appropriate exception message.

Overrides:
getMessage in class java.lang.Throwable

printStackTrace

public void printStackTrace()
Prints the stack trace, preferring the root cause if it exists.

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream os)
Prints the stack trace, preferring the root cause if it exists.

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintWriter os)
Prints the stack trace, preferring the root cause if it exists.

Overrides:
printStackTrace in class java.lang.Throwable

toString

public java.lang.String toString()
Print the exception as a string.

Overrides:
toString in class javax.naming.NamingException