Package org.firebirdsql.jca
Class FBResourceException
- java.lang.Object
- 
- java.lang.Throwable
- 
- java.lang.Exception
- 
- javax.resource.ResourceException
- 
- org.firebirdsql.jca.FBResourceException
 
 
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable
 - Direct Known Subclasses:
- FBIncorrectXidException,- FBResourceTransactionException
 
 public class FBResourceException extends javax.resource.ResourceExceptionFBResourceExceptionshould be used in places whereResourceExceptionshould 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); }- Author:
- Roman Rokytskyy
- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description FBResourceException(java.lang.Exception original)Create a new instance ofFBResourceExceptionwith a generic error code that is linked to another (sub) exception.FBResourceException(java.lang.String reason)Create a new instance ofFBResourceExceptionwith a given string message and generic error code.FBResourceException(java.lang.String reason, java.lang.Exception original)Create a new instance ofFBResourceExceptionwith a generic error code that is linked to another (sub) exception.FBResourceException(java.lang.String reason, java.lang.String errorCode)Create a new instance ofFBResourceExceptionwith a message and specific error code.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetMessage()Get message of this exception.voidprintStackTrace()Print the stack trace of this exception toSTDERRvoidprintStackTrace(java.io.PrintStream s)Print the stack trace of this exception to a givenPrintStreamvoidprintStackTrace(java.io.PrintWriter s)Print the stack trace of this exception to a givenPrintWriter- 
Methods inherited from class javax.resource.ResourceExceptiongetErrorCode, getLinkedException, setErrorCode, setLinkedException
 
- 
 
- 
- 
- 
Constructor Detail- 
FBResourceExceptionpublic FBResourceException(java.lang.String reason) Create a new instance ofFBResourceExceptionwith a given string message and generic error code.- Parameters:
- reason- The string message for the exception
 
 - 
FBResourceExceptionpublic FBResourceException(java.lang.String reason, java.lang.String errorCode)Create a new instance ofFBResourceExceptionwith a message and specific error code.- Parameters:
- reason- The string message for the exception
- errorCode- The error code for the cause of the exception
 
 - 
FBResourceExceptionpublic FBResourceException(java.lang.String reason, java.lang.Exception original)Create a new instance ofFBResourceExceptionwith a generic error code that is linked to another (sub) exception.- Parameters:
- reason- The string message for the exception
- original- The original exception to which this instance is to be linked to
 
 - 
FBResourceExceptionpublic FBResourceException(java.lang.Exception original) Create a new instance ofFBResourceExceptionwith a generic error code that is linked to another (sub) exception.- Parameters:
- original- The original exception to which this instance is to be linked to
 
 
- 
 - 
Method Detail- 
getMessagepublic java.lang.String getMessage() Get message of this exception.- Overrides:
- getMessagein class- javax.resource.ResourceException
- Returns:
- combined message of this exception and original exception.
 
 - 
printStackTracepublic void printStackTrace() Print the stack trace of this exception toSTDERR- Overrides:
- printStackTracein class- java.lang.Throwable
 
 - 
printStackTracepublic void printStackTrace(java.io.PrintStream s) Print the stack trace of this exception to a givenPrintStream- Overrides:
- printStackTracein class- java.lang.Throwable
- Parameters:
- s- The- PrintStreamto which to write the stack trace
 
 - 
printStackTracepublic void printStackTrace(java.io.PrintWriter s) Print the stack trace of this exception to a givenPrintWriter- Overrides:
- printStackTracein class- java.lang.Throwable
- Parameters:
- s- The- PrintWriterto which to write the stack trace
 
 
- 
 
-