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.util.StringMessageUtils;
14  
15  /**
16   * <code>DefaultHandler</code> TODO (document class)
17   *
18   */
19  public class DefaultHandler extends AbstractExceptionHandler
20  {
21  
22      public DefaultHandler()
23      {
24          super();
25          registerException(Throwable.class);
26      }
27  
28      public void processException(ErrorMessage message, Throwable t) throws HandlerException
29      {
30          String msg = LocaleMessage.defaultHandlerMessage();
31          System.out.println(StringMessageUtils.getBoilerPlate(msg));
32      }
33  
34  }