com.resilientedge.util.exception
Class InfrastructureException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.resilientedge.util.exception.InfrastructureException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
LoggerException, XmlMappingException

public class InfrastructureException
extends java.lang.Exception

Infrastructure Exception.

This is the base exception for all other exceptions within applications built using the infrastructure, or utility, layer. All public APIs must throw this exception at a minimum, although a subclass of this exception may be thrown where applicable.

When any exception is caught, construct a new InfrastructureException with the caught exception and throw. This allows for consistent catch blocks throughout the application, which may inquire about the nested exception to determine various error-handling logic.

Version:
$Revision: 1.1.1.1 $
Author:
jwh
See Also:
Serialized Form

Constructor Summary
InfrastructureException()
          Default Constructor with no message or nested exception
InfrastructureException(java.lang.String message)
          Constructor with no nested exception, but a message
InfrastructureException(java.lang.String message, java.lang.Throwable nestedException)
          Constructor with a message and nested exception
 
Method Summary
 java.lang.String getMessage()
          Returns the message of this instance, and of the nested exception, if available.
 java.lang.Throwable getNestedException()
          Returns the nested exception.
 boolean hasNestedException()
          Returns true if there is a nested exception
 void printStackTrace()
          Send the stack trace to the given printstream.
 void printStackTrace(java.io.PrintStream ps)
          Send the stack trace to the given printstream.
 void printStackTrace(java.io.PrintWriter pw)
          Send the stack trace to the given printwriter.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InfrastructureException

public InfrastructureException()
Default Constructor with no message or nested exception

InfrastructureException

public InfrastructureException(java.lang.String message)
Constructor with no nested exception, but a message
Parameters:
message - Parameter Description

InfrastructureException

public InfrastructureException(java.lang.String message,
                               java.lang.Throwable nestedException)
Constructor with a message and nested exception
Parameters:
message -  
nestedException - Parameter Description
Method Detail

getMessage

public java.lang.String getMessage()
Returns the message of this instance, and of the nested exception, if available.
Overrides:
getMessage in class java.lang.Throwable
Returns:
String containing the message

getNestedException

public java.lang.Throwable getNestedException()
Returns the nested exception.
Returns:
Throwable reference to the nested exception, or null if there is no nested exception

hasNestedException

public boolean hasNestedException()
Returns true if there is a nested exception
Returns:
true if there is a nested exception

printStackTrace

public void printStackTrace(java.io.PrintWriter pw)
Send the stack trace to the given printwriter.
Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
pw - java.io.PrintWriter to send the stack trace to

printStackTrace

public void printStackTrace(java.io.PrintStream ps)
Send the stack trace to the given printstream.
Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
ps - java.io.PrintStream to send the stack trace to

printStackTrace

public void printStackTrace()
Send the stack trace to the given printstream.
Overrides:
printStackTrace in class java.lang.Throwable


Copyright © 2001 Resilient Edge, Inc. All Rights Reserved.