1 /* 2 * $Id: ExceptionReader.java 7963 2007-08-21 08:53:15Z dirk.olmes $ 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 CPAL v1.0 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; 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 public interface ExceptionReader 22 { 23 24 String getMessage(Throwable t); 25 26 Throwable getCause(Throwable t); 27 28 Class getExceptionType(); 29 30 /** 31 * Returns a map of the non-stanard information stored on the exception 32 * 33 * @param t the exception to extract the information from 34 * @return a map of the non-stanard information stored on the exception 35 */ 36 Map getInfo(Throwable t); 37 38 }