Package com.primavera
Class PrimaveraException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.primavera.PrimaveraException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ClientException,NetworkException,ServerException,ValueObjectException
Base class for all Primavera exceptions
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPrimaveraException(String strMessage) Class constructor specifying a detailed message.PrimaveraException(String strMessage, Throwable thE) Class constructor specifying a detailed message and the original thrown exception. -
Method Summary
Modifier and TypeMethodDescriptionReturns the original exception if this exception was thrown as a result of an original exception.Provides programmatic access to the stack trace information printed by printStackTrace().static StringReturn stack trace string from a Throwable objectbooleanReturns true if the original exception is SQLException.voidPrint the message/stack trace for the root exception, as well as this exception.voidPrint the message/stack trace for the root exception, as well as this exception.voidPrint the message/stack trace for the root exception, as well as this exception.voidRemove the original exception if it is not PrimaveraException.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getSuppressed, initCause, setStackTrace, toString
-
Constructor Details
-
PrimaveraException
Class constructor specifying a detailed message and the original thrown exception.- Parameters:
strMessage- the detailed message of this exceptionthE- the originally thrown exception
-
PrimaveraException
Class constructor specifying a detailed message.- Parameters:
strMessage- the message of this exception
-
-
Method Details
-
printStackTrace
public void printStackTrace()Print the message/stack trace for the root exception, as well as this exception.- Overrides:
printStackTracein classThrowable
-
printStackTrace
Print the message/stack trace for the root exception, as well as this exception.- Overrides:
printStackTracein classThrowable- Parameters:
s-PrintStreamto use for output
-
printStackTrace
Print the message/stack trace for the root exception, as well as this exception.- Overrides:
printStackTracein classThrowable- Parameters:
s-PrintWriterto use for output- Since:
- JDK1.1
-
getStackTrace
Provides programmatic access to the stack trace information printed by printStackTrace(). Returns an array of stack trace elements, each representing one stack frame. The zeroth element of the array (assuming the array's length is non-zero) represents the top of the stack, which is the last method invocation in the sequence. Typically, this is the point at which this throwable was created and thrown. The last element of the array (assuming the array's length is non-zero) represents the bottom of the stack, which is the first method invocation in the sequence.- Overrides:
getStackTracein classThrowable- Returns:
- an array of stack trace elements representing the stack trace pertaining to this exception.
-
isSQLExceptionThrown
public boolean isSQLExceptionThrown()Returns true if the original exception is SQLException.- Returns:
- true if the original exception is SQLException
-
getOriginalException
Returns the original exception if this exception was thrown as a result of an original exception.- Returns:
- the original exception, or null if no original exception
-
removeOriginalException
public void removeOriginalException()Remove the original exception if it is not PrimaveraException. But the stack trace will be kept. -
getStackTrace
Return stack trace string from a Throwable object- Parameters:
th- Throwable object- Returns:
- String containing stack trace
-