ExceptionHelper (Mule ESB 2.2.1 API)
Keywords: org.mule.config.ExceptionHelper class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.config
Class ExceptionHelper

    java.lang.Object
      org.mule.config.ExceptionHelper

    public final class ExceptionHelper

extends Object

`ExceptionHelper` provides a number of helper functions that can be useful for dealing 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.

Field Summary
`static String` | `APPLY_TO_PROPERTY` a comma-separated list of other protocols the mappings in a file can be applied to
`static 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

Method Summary
`static String` | `getDocUrl(Class exception)`
`static Class` | `getErrorClass(int code)`
`static int` | `getErrorCode(Class exception)`
`static String` | `getErrorCodePropertyName(String protocol)`
`static String` | `getErrorMapping(String protocol, Class exception)`
`static Map` | `getExceptionInfo(Throwable t)`
`static ExceptionReader` | `getExceptionReader(Throwable t)` Gets an exception reader for the exception
`static List` | `getExceptionsAsList(Throwable t)`
`static String` | `getExceptionStack(Throwable t)`
`static String` | `getJavaDocUrl(Class exception)`
`static Throwable` | `getRootException(Throwable t)`
`static MuleException` | `getRootMuleException(Throwable t)`
`static Throwable` | `getRootParentException(Throwable t)`
`static void` | `registerExceptionReader(ExceptionReader reader)` Registers an exception reader with Mule
`static String` | `writeException(Throwable t)`

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 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 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 final Log logger

  logger used by this class

Method Detail

### getErrorCode

    public static int getErrorCode(Class exception)

### getErrorClass

    public static Class getErrorClass(int code)

### getErrorCodePropertyName

    public static String getErrorCodePropertyName(String protocol)

### getErrorMapping

    public static String getErrorMapping(String protocol,
                                         Class exception)

### getJavaDocUrl

    public static String getJavaDocUrl(Class exception)

### getDocUrl

    public static String getDocUrl(Class exception)

### getRootException

    public static Throwable getRootException(Throwable t)

### getRootParentException

    public static Throwable getRootParentException(Throwable t)

### getRootMuleException

    public static MuleException getRootMuleException(Throwable t)

### getExceptionsAsList

    public static List getExceptionsAsList(Throwable t)

### getExceptionInfo

    public static Map getExceptionInfo(Throwable t)

### getExceptionStack

    public static String getExceptionStack(Throwable t)

### registerExceptionReader

    public static void registerExceptionReader(ExceptionReader reader)

  Registers an exception reader with Mule

  Parameters:
    `reader` - the reader to register.

### getExceptionReader

    public static ExceptionReader getExceptionReader(Throwable t)

  Gets an exception reader for the exception

  Parameters:
    `t` - the exception to get a reader for
  Returns:
    either a specific reader or an instance of DefaultExceptionReader. This method never returns null;

### writeException

    public static String writeException(Throwable t)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.