org.stringer
Class StringerException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--org.stringer.StringerException
All Implemented Interfaces:
java.io.Serializable

public class StringerException
extends java.lang.Exception

This is the generic superclass for all the checked exceptions thrown in Stringer. Exceptions that depend on environmental conditions, such as might occur when parsing an external file, are checked exceptions, because these depend on variable input, and thus problems may not all be detected during testing.

Author:
R. Kevin Cole kcole@users.sourceforge.net
See Also:
Serialized Form

Field Summary
private  java.lang.Throwable cause
           
 
Fields inherited from class java.lang.Exception
 
Fields inherited from class java.lang.Throwable
 
Constructor Summary
StringerException()
           Creates a new StringerException.
StringerException(java.lang.String message)
           Creates a new StringerException with a detail message.
StringerException(java.lang.String message, java.lang.Throwable ex)
           Creates a new StringerException with a detail message and an underlying root cause.
 
Method Summary
 java.lang.Throwable getCause()
           Returns the underlying exception that caused this exception.
 java.lang.Throwable initCause(java.lang.Throwable cause)
           The initCause() method initializes the root exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cause

private java.lang.Throwable cause
Constructor Detail

StringerException

public StringerException()

Creates a new StringerException.


StringerException

public StringerException(java.lang.String message,
                         java.lang.Throwable ex)

Creates a new StringerException with a detail message and an underlying root cause.

Parameters:
message - indicates the specific problem
ex - the original cause of this exception

StringerException

public StringerException(java.lang.String message)

Creates a new StringerException with a detail message.

Parameters:
message - - indicates the specific problem
Method Detail

getCause

public java.lang.Throwable getCause()

Returns the underlying exception that caused this exception.

Overrides:
getCause in class java.lang.Throwable
Returns:
the root exception that caused this exception to be thrown

initCause

public java.lang.Throwable initCause(java.lang.Throwable cause)

The initCause() method initializes the root exception. This can be called only once, normally from the constructor. Calling it a second time throws an IllegalStateException. Required by Java 1.4.

Overrides:
initCause in class java.lang.Throwable
Parameters:
cause - the original exception which led to this exception
Returns:
this exception object


Copyright © R. Kevin Cole. All Rights Reserved.