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