net.walend.jdbc
Class NestedSQLException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.sql.SQLException
                    |
                    +--net.walend.jdbc.NestedSQLException
All Implemented Interfaces:
HasNestedThrowable, java.io.Serializable

public class NestedSQLException
extends java.sql.SQLException
implements HasNestedThrowable, java.io.Serializable

An SQLException that wraps another Throwable.

Since:
20001127
Author:
David Walend

Field Summary
private  java.lang.Throwable nested
           
 
Fields inherited from class java.sql.SQLException
 
Fields inherited from class java.lang.Exception
 
Fields inherited from class java.lang.Throwable
 
Constructor Summary
NestedSQLException()
          Only use this constructor for Serialization.
NestedSQLException(java.lang.String message)
           
NestedSQLException(java.lang.String message, java.lang.Throwable nester)
           
NestedSQLException(java.lang.Throwable nester)
           
 
Method Summary
 java.lang.String getMessage()
          Returns this exception's message, followed by the nested Throwable's message, surrounded by []'s.
 java.lang.Throwable getNestedThrowable()
          Returns the nested Throwable, or null if there doesn't happent to be one.
 boolean hasNestedThrowable()
           
 void printLimitedStackTrace()
           
 void printLimitedStackTrace(java.io.PrintStream ps)
          Print the stack trace of just this Throwable.
 void printLimitedStackTrace(java.io.PrintWriter pw)
          Print the stack trace of just this Throwable.
 void printStackTrace()
           
 void printStackTrace(java.io.PrintStream ps)
           
 void printStackTrace(java.io.PrintWriter pw)
           
 
Methods inherited from class java.sql.SQLException
getErrorCode, getNextException, getSQLState, setNextException
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

nested

private java.lang.Throwable nested
Constructor Detail

NestedSQLException

public NestedSQLException()
Only use this constructor for Serialization.


NestedSQLException

public NestedSQLException(java.lang.String message)

NestedSQLException

public NestedSQLException(java.lang.Throwable nester)

NestedSQLException

public NestedSQLException(java.lang.String message,
                          java.lang.Throwable nester)
Method Detail

getMessage

public java.lang.String getMessage()
Returns this exception's message, followed by the nested Throwable's message, surrounded by []'s.

Overrides:
getMessage in class java.lang.Throwable

getNestedThrowable

public java.lang.Throwable getNestedThrowable()
Returns the nested Throwable, or null if there doesn't happent to be one.

Specified by:
getNestedThrowable in interface HasNestedThrowable

hasNestedThrowable

public boolean hasNestedThrowable()
Specified by:
hasNestedThrowable in interface HasNestedThrowable

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

printLimitedStackTrace

public void printLimitedStackTrace()

printLimitedStackTrace

public void printLimitedStackTrace(java.io.PrintStream ps)
Description copied from interface: HasNestedThrowable
Print the stack trace of just this Throwable.

Specified by:
printLimitedStackTrace in interface HasNestedThrowable

printLimitedStackTrace

public void printLimitedStackTrace(java.io.PrintWriter pw)
Description copied from interface: HasNestedThrowable
Print the stack trace of just this Throwable.

Specified by:
printLimitedStackTrace in interface HasNestedThrowable


Copyright (c) 2000, 2001, David Walend