View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.example.errorhandler.handlers;
8   
9   import org.mule.example.errorhandler.AbstractExceptionHandler;
10  import org.mule.example.errorhandler.ErrorMessage;
11  import org.mule.example.errorhandler.HandlerException;
12  import org.mule.example.errorhandler.LocaleMessage;
13  import org.mule.example.errorhandler.exceptions.BusinessException;
14  import org.mule.util.StringMessageUtils;
15  
16  /**
17   * <code>BusinessHandler</code>
18   */
19  public class BusinessHandler extends AbstractExceptionHandler
20  {
21  
22      public BusinessHandler()
23      {
24          super();
25          registerException(BusinessException.class);
26      }
27  
28      protected void processException(ErrorMessage message, Throwable t) throws HandlerException
29      {
30          String msg = LocaleMessage.businessHandlerMessage();
31          System.out.println(StringMessageUtils.getBoilerPlate(msg));
32      }
33  }