1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
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 | |
|
18 | |
|
19 | |
public class BusinessHandler extends AbstractExceptionHandler |
20 | |
{ |
21 | |
|
22 | |
public BusinessHandler() |
23 | |
{ |
24 | 0 | super(); |
25 | 0 | registerException(BusinessException.class); |
26 | 0 | } |
27 | |
|
28 | |
protected void processException(ErrorMessage message, Throwable t) throws HandlerException |
29 | |
{ |
30 | 0 | String msg = LocaleMessage.businessHandlerMessage(); |
31 | 0 | System.out.println(StringMessageUtils.getBoilerPlate(msg)); |
32 | 0 | } |
33 | |
} |