Primavera Integration API 7.0

com.primavera
Class PrimaveraException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.primavera.PrimaveraException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ClientException, NetworkException, ServerException, ValueObjectException

public class PrimaveraException
extends java.lang.Exception
implements java.io.Serializable

Base class for all Primavera exceptions

See Also:
Serialized Form

Constructor Summary
PrimaveraException(java.lang.String strMessage)
          Class constructor specifying a detailed message.
PrimaveraException(java.lang.String strMessage, java.lang.Throwable thE)
          Class constructor specifying a detailed message and the original thrown exception.
 
Method Summary
 java.lang.Throwable getOriginalException()
          Returns the original exception if this exception was thrown as a result of an original exception.
 java.lang.StackTraceElement[] getStackTrace()
          Provides programmatic access to the stack trace information printed by printStackTrace().
 boolean isSQLExceptionThrown()
          Returns true if the original exception is SQLException
 void printStackTrace()
          Print the message/stack trace for the root exception, as well as this exception.
 void printStackTrace(java.io.PrintStream s)
          Print the message/stack trace for the root exception, as well as this exception.
 void printStackTrace(java.io.PrintWriter s)
          Print the message/stack trace for the root exception, as well as this exception.
 void removeOriginalException()
          Remove the original exception if it is not PrimaveraException.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrimaveraException

public PrimaveraException(java.lang.String strMessage,
                          java.lang.Throwable thE)
Class constructor specifying a detailed message and the original thrown exception.

Parameters:
strMessage - the detailed message of this exception
thE - the originally thrown exception

PrimaveraException

public PrimaveraException(java.lang.String strMessage)
Class constructor specifying a detailed message.

Parameters:
strMessage - the message of this exception
Method Detail

printStackTrace

public void printStackTrace()
Print the message/stack trace for the root exception, as well as this exception.

Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream s)
Print the message/stack trace for the root exception, as well as this exception.

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
s - PrintStream to use for output

printStackTrace

public void printStackTrace(java.io.PrintWriter s)
Print the message/stack trace for the root exception, as well as this exception.

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
s - PrintWriter to use for output
Since:
JDK1.1

getStackTrace

public java.lang.StackTraceElement[] 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:
getStackTrace in class java.lang.Throwable
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

public java.lang.Throwable 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.


Primavera Integration API 7.0

Copyright © 2003, 2009, Oracle and/or its affiliates. All rights reserved.