1 10 11 package org.mule.samples.errorhandler.handlers; 12 13 import org.mule.samples.errorhandler.AbstractExceptionHandler; 14 import org.mule.samples.errorhandler.ErrorMessage; 15 import org.mule.samples.errorhandler.HandlerException; 16 import org.mule.samples.errorhandler.exceptions.BusinessException; 17 import org.mule.util.StringMessageUtils; 18 19 25 public class BusinessHandler extends AbstractExceptionHandler 26 { 27 28 public BusinessHandler() 29 { 30 super(); 31 registerException(BusinessException.class); 32 } 33 34 protected void processException(ErrorMessage message, Throwable t) throws HandlerException 35 { 36 System.out.println(StringMessageUtils.getBoilerPlate("Exception received in /n" 37 + " BUSINESS EXCEPTION HANDLER /n." 38 + " Logic could be put in here to enrich the message content")); 39 } 40 41 } 42 | Popular Tags |