1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
package org.mule.processor; |
8 | |
|
9 | |
import org.mule.api.MuleEvent; |
10 | |
import org.mule.api.MuleException; |
11 | |
import org.mule.config.ExceptionHelper; |
12 | |
import org.mule.message.DefaultExceptionPayload; |
13 | |
import org.mule.transport.NullPayload; |
14 | |
|
15 | 0 | public class ExceptionHandlingMessageProcessor extends AbstractInterceptingMessageProcessor |
16 | |
{ |
17 | |
public MuleEvent process(MuleEvent event) throws MuleException |
18 | |
{ |
19 | |
try |
20 | |
{ |
21 | 0 | return processNext(event); |
22 | |
} |
23 | 0 | catch (Exception e) |
24 | |
{ |
25 | 0 | e = (Exception) ExceptionHelper.sanitizeIfNeeded(e); |
26 | 0 | return event.getFlowConstruct().getExceptionListener().handleException(e, event); |
27 | |
} |
28 | |
} |
29 | |
} |