org.apache.avalon.util.exception
Class ExceptionHelper

java.lang.Object
  extended byorg.apache.avalon.util.exception.ExceptionHelper

public class ExceptionHelper
extends Object

General utilities supporting the packaging of exception messages.

Author:
Stephen McConnell

Constructor Summary
ExceptionHelper()
           
 
Method Summary
static String packException(String message, Throwable e)
          Returns the exception and causal exceptions as a formatted string.
static String packException(String message, Throwable[] e, boolean stack)
          Returns the exception and causal exceptions as a formatted string.
static String packException(String message, Throwable e, boolean stack)
          Returns the exception and causal exceptions as a formatted string.
static String packException(Throwable e)
          Returns the exception and causal exceptions as a formatted string.
static String packException(Throwable e, boolean stack)
          Returns the exception and causal exceptions as a formatted string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionHelper

public ExceptionHelper()
Method Detail

packException

public static String packException(Throwable e)
Returns the exception and causal exceptions as a formatted string.

Parameters:
e - the exception
Returns:
String the formatting string

packException

public static String packException(Throwable e,
                                   boolean stack)
Returns the exception and causal exceptions as a formatted string.

Parameters:
e - the exception
stack - TRUE to generate a stack trace
Returns:
String the formatting string

packException

public static String packException(String message,
                                   Throwable e)
Returns the exception and causal exceptions as a formatted string.

Parameters:
message - the header message
e - the exception
Returns:
String the formatting string

packException

public static String packException(String message,
                                   Throwable e,
                                   boolean stack)
Returns the exception and causal exceptions as a formatted string.

Parameters:
message - the header message
e - the exception
stack - TRUE to generate a stack trace
Returns:
String the formatting string

packException

public static String packException(String message,
                                   Throwable[] e,
                                   boolean stack)
Returns the exception and causal exceptions as a formatted string.

Parameters:
message - the header message
e - the exceptions
stack - TRUE to generate a stack trace
Returns:
String the formatting string


Copyright © Apache Software Foundation. All Rights Reserved.