01: /*
02: * $Id: DefaultHandler.java 10789 2008-02-12 20:04:43Z dfeist $
03: * --------------------------------------------------------------------------------------
04: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
05: *
06: * The software in this package is published under the terms of the CPAL v1.0
07: * license, a copy of which has been included with this distribution in the
08: * LICENSE.txt file.
09: */
10:
11: package org.mule.example.errorhandler.handlers;
12:
13: import org.mule.example.errorhandler.AbstractExceptionHandler;
14: import org.mule.example.errorhandler.ErrorMessage;
15: import org.mule.example.errorhandler.HandlerException;
16: import org.mule.example.errorhandler.LocaleMessage;
17: import org.mule.util.StringMessageUtils;
18:
19: /**
20: * <code>DefaultHandler</code> TODO (document class)
21: *
22: */
23: public class DefaultHandler extends AbstractExceptionHandler {
24:
25: public DefaultHandler() {
26: super ();
27: registerException(Throwable.class);
28: }
29:
30: public void processException(ErrorMessage message, Throwable t)
31: throws HandlerException {
32: String msg = LocaleMessage.defaultHandlerMessage();
33: System.out.println(StringMessageUtils.getBoilerPlate(msg));
34: }
35:
36: }
|