net.sf.fikin.sql
Class SQLExceptionDecorator

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.sql.SQLException
              extended by net.sf.fikin.sql.SQLExceptionDecorator
All Implemented Interfaces:
java.io.Serializable

public class SQLExceptionDecorator
extends java.sql.SQLException

This class decorates any exception into an SQLException.

This is useful in cases where SQLException is expected its true origin is some other exception.

created on Dec 17, 2006

Since:
Version:
$Revision: 1.3 $
Author:
fiykov
See Also:
Serialized Form

Constructor Summary
SQLExceptionDecorator(java.lang.Exception e)
           
 
Method Summary
 java.lang.Throwable getCause()
           
 java.lang.Exception getException()
          get decorated exception
 java.lang.String getLocalizedMessage()
           
 java.lang.String getMessage()
           
 java.lang.StackTraceElement[] getStackTrace()
           
 void printStackTrace()
           
 void printStackTrace(java.io.PrintStream s)
           
 void printStackTrace(java.io.PrintWriter s)
           
 java.lang.String toString()
           
 
Methods inherited from class java.sql.SQLException
getErrorCode, getNextException, getSQLState, setNextException
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SQLExceptionDecorator

public SQLExceptionDecorator(java.lang.Exception e)
Method Detail

getException

public java.lang.Exception getException()
get decorated exception

Returns:
assigned exception object

getCause

public java.lang.Throwable getCause()
Overrides:
getCause 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

getStackTrace

public java.lang.StackTraceElement[] getStackTrace()
Overrides:
getStackTrace in class java.lang.Throwable

printStackTrace

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

printStackTrace

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

printStackTrace

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

toString

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


Copyright © 2003-2007 Nikolay Fiykov. All Rights Reserved.