1
2
3
4
5
6
7 package org.mule.transport.soap.axis;
8
9 import org.mule.api.MuleContext;
10 import org.mule.api.MuleEvent;
11 import org.mule.exception.DefaultServiceExceptionStrategy;
12
13 import java.util.ArrayList;
14 import java.util.List;
15
16 public class UnitTestExceptionStrategy extends DefaultServiceExceptionStrategy
17 {
18
19
20
21
22 private List<Throwable> messagingExceptions = null;
23
24 public UnitTestExceptionStrategy(MuleContext context)
25 {
26 super(context);
27 messagingExceptions = new ArrayList<Throwable>();
28 }
29
30 @Override
31 protected void logFatal(MuleEvent event, Throwable t)
32 {
33 logger.debug("logFatal", t);
34 }
35
36 @Override
37 protected void logException(Throwable t)
38 {
39 logger.debug("logException", t);
40 }
41
42 @Override
43 protected void doHandleException(Exception e, MuleEvent event)
44 {
45 messagingExceptions.add(e);
46 super.doHandleException(e, event);
47 }
48
49 public List<Throwable> getMessagingExceptions()
50 {
51 return messagingExceptions;
52 }
53 }
54
55