Openwings API Documentation (v1.1)

net.openwings.policy
Class PolicyException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bynet.openwings.policy.PolicyException
All Implemented Interfaces:
java.io.Serializable

public class PolicyException
extends java.lang.Exception

This class defines an exception specific to policies. This exception may be used to encapsulate another exception generated during policy operations.

See Also:
Serialized Form

Constructor Summary
PolicyException()
          Constructs a PolicyException with no specified detail message.
PolicyException(java.lang.Exception e, java.lang.String message)
          Constructs a new PolicyException.
PolicyException(java.lang.String message)
          Constructs a PolicyException with the specified detail message.
 
Method Summary
 java.lang.Exception getEmbeddedException()
          Get the Exception that triggered this exception.
 java.lang.String getMessage()
          Returns the error message string of this throwable object.
 void printStackTrace()
          Prints this Throwable and its backtrace to the standard error stream.
 void printStackTrace(java.io.PrintStream s)
          Prints this Throwable and its backtrace to the standard error stream.
 void printStackTrace(java.io.PrintWriter s)
          Prints this Throwable and its backtrace to the standard error stream.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PolicyException

public PolicyException()
Constructs a PolicyException with no specified detail message.


PolicyException

public PolicyException(java.lang.String message)
Constructs a PolicyException with the specified detail message.

Parameters:
message - the detail message

PolicyException

public PolicyException(java.lang.Exception e,
                       java.lang.String message)
Constructs a new PolicyException.

Parameters:
e - The Exception that triggered this exception. May be null.
message - The text message to be associated with this exception.
Method Detail

getEmbeddedException

public java.lang.Exception getEmbeddedException()
Get the Exception that triggered this exception.

Returns:
The Exception that triggered this exception. May be null.

getMessage

public java.lang.String getMessage()
Returns the error message string of this throwable object. Add the embedded exception message to the message.


printStackTrace

public void printStackTrace()
Prints this Throwable and its backtrace to the standard error stream. This method prints a stack trace for this Throwable object on the error output stream that is the value of the field System.err. If an embedded exception is present, will print out the embedded exception stack trace, otherwise will print policy exception stack trace.


printStackTrace

public void printStackTrace(java.io.PrintStream s)
Prints this Throwable and its backtrace to the standard error stream. This method prints a stack trace for this Throwable object on the error output stream that is the value of the field System.err. If an embedded exception is present, will print out the embedded exception stack trace, otherwise will print policy exception stack trace.

Parameters:
s - PrintStream to use for output

printStackTrace

public void printStackTrace(java.io.PrintWriter s)
Prints this Throwable and its backtrace to the standard error stream. This method prints a stack trace for this Throwable object on the error output stream that is the value of the field System.err. If an embedded exception is present, will print out the embedded exception stack trace, otherwise will print policy exception stack trace.

Parameters:
s - PrintWriter to use for output

Openwings API Documentation (v1.1)