KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mule > config > ExceptionReader


1 /*
2  * $Id: ExceptionReader.java 3798 2006-11-04 04:07:14Z aperepel $
3  * --------------------------------------------------------------------------------------
4  * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
5  *
6  * The software in this package is published under the terms of the MuleSource MPL
7  * license, a copy of which has been included with this distribution in the
8  * LICENSE.txt file.
9  */

10
11 package org.mule.config;
12
13 import java.util.Map JavaDoc;
14
15 /**
16  * Provides a strategy interface for reading information from an exception in a
17  * consistent way. For example JMS 1.0.2b Uses linkedExceptions rather that 'cause'
18  * and SQLExceptions hold additional information that can be extracted using this
19  * interface
20  *
21  * @author <a HREF="mailto:ross.mason@symphonysoft.com">Ross Mason</a>
22  * @version $Revision: 3798 $
23  */

24 public interface ExceptionReader
25 {
26
27     public String JavaDoc getMessage(Throwable JavaDoc t);
28
29     public Throwable JavaDoc getCause(Throwable JavaDoc t);
30
31     public Class JavaDoc getExceptionType();
32
33     /**
34      * Returns a map of the non-stanard information stored on the exception
35      *
36      * @param t the exception to extract the information from
37      * @return a map of the non-stanard information stored on the exception
38      */

39     public Map JavaDoc getInfo(Throwable JavaDoc t);
40 }
41
Popular Tags