org.tm4j.topicmap
Class TopicMapProviderException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.tm4j.topicmap.TopicMapProviderException
All Implemented Interfaces:
java.io.Serializable

public class TopicMapProviderException
extends java.lang.Exception

Indicates that a topic map provider encountered an unexpected condition.

Author:
Kal Ahmed
See Also:
TopicMapProvider, Serialized Form

Field Summary
protected static java.lang.String DEFAULT_MESSAGE
          The default detail message associated with this exception.
protected  java.lang.String m_errorString
          The detail message associated with this exception.
protected  java.lang.Exception m_nestedException
          The nested error wrapped by this exception.
 
Constructor Summary
TopicMapProviderException(java.lang.Exception ex)
          Creates an provider exception which wraps a nested error.
TopicMapProviderException(java.lang.String msg)
          Creates a provider exception which does not wrap a nested error.
TopicMapProviderException(java.lang.String msg, java.lang.Exception cause)
          Creates a provider exception which wraps a nested error.
 
Method Summary
 java.lang.Throwable getCause()
          Returns the nested exception that led to this exception being thrown
 java.lang.String getMessage()
          Returns a displayable message for the exception.
 void printStackTrace()
           
 java.lang.String toString()
          Returns a string representation of the provider exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_MESSAGE

protected static final java.lang.String DEFAULT_MESSAGE
The default detail message associated with this exception.

See Also:
Constant Field Values

m_nestedException

protected java.lang.Exception m_nestedException
The nested error wrapped by this exception.


m_errorString

protected java.lang.String m_errorString
The detail message associated with this exception.

Constructor Detail

TopicMapProviderException

public TopicMapProviderException(java.lang.Exception ex)
Creates an provider exception which wraps a nested error.

Parameters:
ex - The original exception which caused the provider exception.

TopicMapProviderException

public TopicMapProviderException(java.lang.String msg)
Creates a provider exception which does not wrap a nested error.

Parameters:
msg - The error message associated with the exception.

TopicMapProviderException

public TopicMapProviderException(java.lang.String msg,
                                 java.lang.Exception cause)
Creates a provider exception which wraps a nested error.

Parameters:
msg - The error message associated with this exception.
cause - The nested exception which is wrapped by this exception.
Method Detail

getMessage

public java.lang.String getMessage()
Returns a displayable message for the exception. If this exception wraps a nested error, then the nested error's message is also shown.

Returns:
The message associated with the exception.

getCause

public java.lang.Throwable getCause()
Returns the nested exception that led to this exception being thrown

Returns:
the throwable stored as the nested exception.

toString

public java.lang.String toString()
Returns a string representation of the provider exception. If this exception wraps a nested error, its string representation is appended to the returned string.

Returns:
A string representation of the provider exception

printStackTrace

public void printStackTrace()