01: /*
02: * $Id: BusinessHandler.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.example.errorhandler.exceptions.BusinessException;
18: import org.mule.util.StringMessageUtils;
19:
20: /**
21: * <code>BusinessHandler</code>
22: */
23: public class BusinessHandler extends AbstractExceptionHandler {
24:
25: public BusinessHandler() {
26: super ();
27: registerException(BusinessException.class);
28: }
29:
30: protected void processException(ErrorMessage message, Throwable t)
31: throws HandlerException {
32: String msg = LocaleMessage.businessHandlerMessage();
33: System.out.println(StringMessageUtils.getBoilerPlate(msg));
34: }
35: }
|