org.mule.config
Class ExceptionHelper

java.lang.Object
  extended byorg.mule.config.ExceptionHelper

public class ExceptionHelper
extends java.lang.Object

ExceptionHelper provides a number of helper functions that can be useful for detailing with Mule exceptions. This class has 3 core functions -

1. ErrorCode lookup. A corresponding Mule error code can be found using for a given Mule exception 2. Addtional Error information such as Java doc url for a given exception can be resolved using this class 3. Error code mappings can be looked up by providing the the protocol to map to and the Mule exception

Version:
$Revision: 1.3 $
Author:
Ross Mason

Field Summary
static java.lang.String APPLY_TO_PROPERTY
          a comma-separated list of other protocols the mappings in a file can be applied to
static java.lang.String ERROR_CODE_PROPERTY
          This is the property to set the error code to no the message it is the property name the Transport provider uses set the set the error code on the underlying message
protected static Log logger
          logger used by this class
 
Constructor Summary
ExceptionHelper()
           
 
Method Summary
static java.lang.String getDocUrl(java.lang.Class exception)
           
static java.lang.Class getErrorClass(int code)
           
static int getErrorCode(java.lang.Class exception)
           
static java.lang.String getErrorCodePropertyName(java.lang.String protocol)
           
static java.lang.String getErrorMapping(java.lang.String protocol, java.lang.Class exception)
           
static java.lang.String getErrorMapping(java.lang.String protocol, int code)
           
static java.lang.String getExceptionStack(java.lang.Throwable t)
           
static java.lang.String getJavaDocUrl(java.lang.Class exception)
           
static java.lang.Throwable getRootException(java.lang.Throwable t)
           
static UMOException getRootMuleException(java.lang.Throwable t)
           
static java.lang.Throwable getRootParentException(java.lang.Throwable t)
           
static void initialise()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR_CODE_PROPERTY

public static final java.lang.String ERROR_CODE_PROPERTY
This is the property to set the error code to no the message it is the property name the Transport provider uses set the set the error code on the underlying message

See Also:
Constant Field Values

APPLY_TO_PROPERTY

public static final java.lang.String APPLY_TO_PROPERTY
a comma-separated list of other protocols the mappings in a file can be applied to

See Also:
Constant Field Values

logger

protected static transient Log logger
logger used by this class

Constructor Detail

ExceptionHelper

public ExceptionHelper()
Method Detail

getErrorCode

public static int getErrorCode(java.lang.Class exception)

getErrorClass

public static java.lang.Class getErrorClass(int code)

getErrorMapping

public static java.lang.String getErrorMapping(java.lang.String protocol,
                                               int code)

getErrorCodePropertyName

public static java.lang.String getErrorCodePropertyName(java.lang.String protocol)

getErrorMapping

public static java.lang.String getErrorMapping(java.lang.String protocol,
                                               java.lang.Class exception)

initialise

public static void initialise()
                       throws MuleRuntimeException
Throws:
MuleRuntimeException

getJavaDocUrl

public static java.lang.String getJavaDocUrl(java.lang.Class exception)

getDocUrl

public static java.lang.String getDocUrl(java.lang.Class exception)

getRootException

public static java.lang.Throwable getRootException(java.lang.Throwable t)

getRootParentException

public static java.lang.Throwable getRootParentException(java.lang.Throwable t)

getRootMuleException

public static UMOException getRootMuleException(java.lang.Throwable t)

getExceptionStack

public static java.lang.String getExceptionStack(java.lang.Throwable t)


Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.