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

public class PrimaveraException extends Exception
Base class for all Primavera exceptions
See Also:
  • Constructor Details

    • PrimaveraException

      public PrimaveraException(String strMessage, 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(String strMessage)
      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:
      printStackTrace in class Throwable
    • printStackTrace

      public void printStackTrace(PrintStream s)
      Print the message/stack trace for the root exception, as well as this exception.
      Overrides:
      printStackTrace in class Throwable
      Parameters:
      s - PrintStream to use for output
    • printStackTrace

      public void printStackTrace(PrintWriter s)
      Print the message/stack trace for the root exception, as well as this exception.
      Overrides:
      printStackTrace in class Throwable
      Parameters:
      s - PrintWriter to use for output
      Since:
      JDK1.1
    • getStackTrace

      public 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 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 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.
    • getStackTrace

      public static String getStackTrace(Throwable th)
      Return stack trace string from a Throwable object
      Parameters:
      th - Throwable object
      Returns:
      String containing stack trace