1
2
3
4
5
6
7
8
9
10
11 package org.mule.test.integration.exceptions;
12
13 import org.mule.api.MuleEvent;
14 import org.mule.exception.AbstractMessagingExceptionStrategy;
15
16 public class TestExceptionStrategy extends AbstractMessagingExceptionStrategy
17 {
18 public TestExceptionStrategy()
19 {
20 super(null);
21 }
22
23 @Override
24 public MuleEvent handleException(Exception exception, MuleEvent event)
25 {
26 MuleEvent result = super.handleException(exception, event);
27 result.getMessage().setPayload("Ka-boom!");
28 return result;
29 }
30
31 public boolean isRedeliver()
32 {
33 return false;
34 }
35 }