com.objectwave.persist
Class QueryException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.objectwave.persist.QueryException
All Implemented Interfaces:
java.io.Serializable

public class QueryException
extends java.lang.Exception

Little more than an exception wrapper class. addInfo attribute could contain the acutal SQL that caused the exception. originalException attribute is the source exception that was caught that threw this exception.

Version:
1.3
Author:
Dave Hoag
See Also:
Serialized Form

Constructor Summary
QueryException(java.lang.String text, java.lang.Exception e)
          Create a new query exception to hide the actual problem.
QueryException(java.lang.String text, java.lang.Exception e, java.lang.String additionalInfo)
          Create a new query exception to hide the actual problem.
 
Method Summary
 java.lang.String getAdditionalInfo()
          Additional information may be provided to assist with debugging efforts.
 java.lang.Exception getOriginalException()
          If an exception occurs within JavaGrinder it will eventually be wrapped by an instance of this class.
 boolean isRetryPossible()
           
 void printStackTrace()
           
 void printStackTrace(java.io.PrintStream stream)
           
 void printStackTrace(java.io.PrintWriter stream)
           
 void setRetryPossible(boolean b)
           
 java.lang.String toString()
          Display a nice version of this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryException

public QueryException(java.lang.String text,
                      java.lang.Exception e)
Create a new query exception to hide the actual problem.

Parameters:
text - The text to display.
e - Exception The reason for creating this object.

QueryException

public QueryException(java.lang.String text,
                      java.lang.Exception e,
                      java.lang.String additionalInfo)
Create a new query exception to hide the actual problem.

Parameters:
text - The text to display.
e - Exception The reason for creating this object.
additionalInfo - Not text to normally display, but may provide more information about the problem.
Method Detail

getAdditionalInfo

public java.lang.String getAdditionalInfo()
Additional information may be provided to assist with debugging efforts. It may contain the SQL statement that cause the error.

Returns:
String The additional information or null.

getOriginalException

public java.lang.Exception getOriginalException()
If an exception occurs within JavaGrinder it will eventually be wrapped by an instance of this class. To get the causing exception, use this method. Not every QueryException will have an original exception.

Returns:
Exception The cause of your problems.

printStackTrace

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

printStackTrace

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

printStackTrace

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

toString

public java.lang.String toString()
Display a nice version of this exception.

Overrides:
toString in class java.lang.Throwable

setRetryPossible

public void setRetryPossible(boolean b)

isRetryPossible

public boolean isRetryPossible()