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 lose the exception that we caught.
Example:
try { // execute some code here ... } catch(GDSException gdsex) { throw new FBResourceException(gdsex); }
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SQL_STATE_GENERAL_ERROR
Deprecated.
Use constants from
SQLStateConstants . To be removed in Jaybird 4. |
Constructor and Description |
---|
FBResourceException(java.lang.Exception original)
Create a new instance of
FBResourceException with a generic error code that is linked to another
(sub) exception. |
FBResourceException(java.lang.String reason)
Create a new instance of
FBResourceException with a given string message and generic error code. |
FBResourceException(java.lang.String reason,
java.lang.Exception original)
Create a new instance of
FBResourceException with a generic error code that is linked to another
(sub) exception. |
FBResourceException(java.lang.String reason,
java.lang.String errorCode)
Create a new instance of
FBResourceException with a message and specific error code. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getMessage()
Get message of this exception.
|
void |
printStackTrace()
Print the stack trace of this exception to
STDERR |
void |
printStackTrace(java.io.PrintStream s)
Print the stack trace of this exception to a given
PrintStream |
void |
printStackTrace(java.io.PrintWriter s)
Print the stack trace of this exception to a given
PrintWriter |
getErrorCode, getLinkedException, setErrorCode, setLinkedException
@Deprecated public static final java.lang.String SQL_STATE_GENERAL_ERROR
SQLStateConstants
. To be removed in Jaybird 4.public FBResourceException(java.lang.String reason)
FBResourceException
with a given string message and generic error code.reason
- The string message for the exceptionpublic FBResourceException(java.lang.String reason, java.lang.String errorCode)
FBResourceException
with a message and specific error code.reason
- The string message for the exceptionerrorCode
- The error code for the cause of the exceptionpublic FBResourceException(java.lang.String reason, java.lang.Exception original)
FBResourceException
with a generic error code that is linked to another
(sub) exception.reason
- The string message for the exceptionoriginal
- The original exception to which this instance is to
be linked topublic FBResourceException(java.lang.Exception original)
FBResourceException
with a generic error code that is linked to another
(sub) exception.original
- The original exception to which this instance is
to be linked topublic java.lang.String getMessage()
getMessage
in class javax.resource.ResourceException
public void printStackTrace()
STDERR
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintStream s)
PrintStream
printStackTrace
in class java.lang.Throwable
s
- The PrintStream
to which to write the stack tracepublic void printStackTrace(java.io.PrintWriter s)
PrintWriter
printStackTrace
in class java.lang.Throwable
s
- The PrintWriter
to which to write the stack traceCopyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.