info.fingo.util
Class EnclosingException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by info.fingo.util.EnclosingException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
CSVException

public abstract class EnclosingException
extends java.lang.Exception

This is the abstract exception which may enclose other exception. It also provides the exception code management.

Author:
FINGO - Maciej Mroczko
See Also:
Serialized Form

Field Summary
protected  int code
          The exception code
protected  java.lang.Exception nestedException
          The enclosed exception
 
Constructor Summary
EnclosingException()
          Default constructor.
EnclosingException(java.lang.Exception nestedException)
          Constructor for EnclosingException.
EnclosingException(int exceptionCode)
          Constructor for EnclosingException.
EnclosingException(int exceptionCode, java.lang.Exception nestedException)
          Constructor for EnclosingException.
EnclosingException(java.lang.String message)
          Constructor for EnclosingException.
EnclosingException(java.lang.String message, java.lang.Exception nestedException)
          Constructor for EnclosingException.
EnclosingException(java.lang.String message, int exceptionCode)
          Constructor for EnclosingException.
EnclosingException(java.lang.String message, int exceptionCode, java.lang.Exception nestedException)
          Constructor for EnclosingException.
 
Method Summary
 java.lang.Throwable fillInStackTrace()
           
 int getCode()
          Returns the code.
 java.lang.String getLocalizedMessage()
           
 java.lang.String getMessage()
           
 void printStackTrace()
           
 void printStackTrace(java.io.PrintStream ps)
           
 void printStackTrace(java.io.PrintWriter pw)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Throwable
getCause, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

nestedException

protected java.lang.Exception nestedException
The enclosed exception


code

protected int code
The exception code

Constructor Detail

EnclosingException

public EnclosingException()
Default constructor.


EnclosingException

public EnclosingException(java.lang.String message)
Constructor for EnclosingException.

Parameters:
message - the exception message

EnclosingException

public EnclosingException(int exceptionCode)
Constructor for EnclosingException.

Parameters:
exceptionCode - the exception code

EnclosingException

public EnclosingException(java.lang.String message,
                          int exceptionCode,
                          java.lang.Exception nestedException)
Constructor for EnclosingException.

Parameters:
message - the exception message
exceptionCode - the exception code
nestedException - the nested exception

EnclosingException

public EnclosingException(int exceptionCode,
                          java.lang.Exception nestedException)
Constructor for EnclosingException.

Parameters:
exceptionCode - the exception code
nestedException - the nested exception

EnclosingException

public EnclosingException(java.lang.Exception nestedException)
Constructor for EnclosingException.

Parameters:
nestedException - the nested exception

EnclosingException

public EnclosingException(java.lang.String message,
                          int exceptionCode)
Constructor for EnclosingException.

Parameters:
message - the exception message
exceptionCode - the exception code

EnclosingException

public EnclosingException(java.lang.String message,
                          java.lang.Exception nestedException)
Constructor for EnclosingException.

Parameters:
message - the exception message
nestedException - the nested exception
Method Detail

getCode

public int getCode()
Returns the code.

Returns:
int The exception code

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Throwable

fillInStackTrace

public java.lang.Throwable fillInStackTrace()
Overrides:
fillInStackTrace in class java.lang.Throwable

getLocalizedMessage

public java.lang.String getLocalizedMessage()
Overrides:
getLocalizedMessage in class java.lang.Throwable

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable

printStackTrace

public void printStackTrace()
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream ps)
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintWriter pw)
Overrides:
printStackTrace in class java.lang.Throwable