com.ibm.security.certclient.base

Class PkException

  1. java.lang.Object
  2. extended byjava.lang.Throwable
  3. extended byjava.lang.Exception
  4. extended bycom.ibm.security.certclient.base.PkException
All implemented interfaces:
Serializable
Direct known subclasses:
PkPollException, PkRejectionException, PkTcpV10CmpException

  1. public class PkException
  2. extends Exception
Thrown by PKI code; it represents the root of the exception hierarchy for PKI. Since it can be thrown as the result of catching another exception, it may contain a wrapped exception.
Author:
Rod Mancisidor
See Also:
Serialized Form

Constructor Summary

Constructor and Description
PkException()
Constructs a new PkException with null as its error message string and null as the wrappedException.
PkException(String s)
Constructs a new PkException with s as its error message string and null as the wrappedException.
PkException(String s,Throwable wrappedException)
Constructs a new PkException with s as its error message string and wrappedException as the wrappedException.
PkException(Throwable wrappedException)
Constructs a new PkException with null as its error message string and wrappedException as the wrappedException.

Method Summary

Modifier and Type Method and Description
  1. Throwable
getWrappedException()
Returns the exception that caused this exception or null if this exception was not caused by another one.
  1. boolean
hasWrappedException()
Returns true if and only if this exception wraps another one that caused it.
  1. void
printStackTrace()
Prints this PkException and its backtrace to the standard error stream.
  1. void
printStackTrace(PrintStream s)
Prints this PkException and its backtrace to the specified print stream.
  1. void
printStackTrace(PrintWriter s)
Prints this PkException and its backtrace to the specified print writer.
  1. String
toString()
Returns a string representation 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

PkException

  1. public PkException()
Constructs a new PkException with null as its error message string and null as the wrappedException. Also, the stack trace is filled.

PkException

  1. public PkException(String s)
Constructs a new PkException with s as its error message string and null as the wrappedException. Also, the stack trace is filled.

PkException

  1. public PkException(String s,
  2. Throwable wrappedException)
Constructs a new PkException with s as its error message string and wrappedException as the wrappedException. Also, the stack trace is filled.

PkException

  1. public PkException(Throwable wrappedException)
Constructs a new PkException with null as its error message string and wrappedException as the wrappedException. Also, the stack trace is filled.

Method Detail

hasWrappedException

  1. public boolean hasWrappedException( )
Returns true if and only if this exception wraps another one that caused it.

getWrappedException

  1. public Throwable getWrappedException( )
Returns the exception that caused this exception or null if this exception was not caused by another one.

toString

  1. public String toString()
Returns a string representation of this exception.
Overrides:
toString in class Throwable

printStackTrace

  1. public void printStackTrace()
Prints this PkException and its backtrace to the standard error stream. This method prints a stack trace for this PkException object on the error output stream that is the value of the field System.err. The first line of output contains the result of the toString() method for this object. Remaining lines represent data previously recorded by the method Throwable.fillInStackTrace().
Overrides:

printStackTrace

  1. public void printStackTrace(PrintStream s)
Prints this PkException and its backtrace to the specified print stream.
Overrides:

printStackTrace

  1. public void printStackTrace(PrintWriter s)
Prints this PkException and its backtrace to the specified print writer.
Overrides: