org.firebirdsql.jca
Class FBResourceException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjavax.resource.ResourceException
              extended byorg.firebirdsql.jca.FBResourceException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
FBResourceTransactionException

public class FBResourceException
extends javax.resource.ResourceException

FBResourceException should be used in places where ResourceException should be thrown according to the interface specification, but we do not want to loose exception that we cautght.

Example:

 try {
     // execute some code here
     ...
 } catch(GDSException gdsex) {
     throw new FBResourceException(gdsex);
 }
 

Author:
Roman Rokytskyy
See Also:
Serialized Form

Field Summary
static java.lang.String SQL_STATE_GENERAL_ERROR
           
 
Constructor Summary
FBResourceException(java.lang.Exception original)
           
FBResourceException(java.lang.String reason)
           
FBResourceException(java.lang.String reason, java.lang.Exception original)
           
FBResourceException(java.lang.String reason, java.lang.String errorCode)
           
 
Method Summary
 java.lang.String getMessage()
          Get message of this exception.
 void printStackTrace()
           
 void printStackTrace(java.io.PrintStream s)
           
 void printStackTrace(java.io.PrintWriter s)
           
 
Methods inherited from class javax.resource.ResourceException
getErrorCode, getLinkedException, setLinkedException
 
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

SQL_STATE_GENERAL_ERROR

public static final java.lang.String SQL_STATE_GENERAL_ERROR
See Also:
Constant Field Values
Constructor Detail

FBResourceException

public FBResourceException(java.lang.String reason)

FBResourceException

public FBResourceException(java.lang.String reason,
                           java.lang.String errorCode)

FBResourceException

public FBResourceException(java.lang.String reason,
                           java.lang.Exception original)

FBResourceException

public FBResourceException(java.lang.Exception original)
Method Detail

getMessage

public java.lang.String getMessage()
Get message of this exception.

Returns:
combined message of this exception and original exception.

printStackTrace

public void printStackTrace()

printStackTrace

public void printStackTrace(java.io.PrintStream s)

printStackTrace

public void printStackTrace(java.io.PrintWriter s)


Copyright © 2001 David Jencks and other authors. All rights reserved.