synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Asankha C. Perera" <>
Subject Error handling and Error handling Hierarchy for Sequences and a new Try mediator
Date Thu, 27 Jul 2006 04:12:03 GMT
I am in the process of introducing Error handling support in Synapse (as 
and hope to commit this into the svn ASAP.

Error handling would be possible through the two methods as given below.

1. Sequences

A sequence would be able to specify another sequence as its error 
handler. If the execution of the sequence now causes an error, it would 
be caught, and an error code, error message and error detail stored into 
the message context, and the error handler sequence invoked. So far I 
have not defined error codes, but would value comments on the following 
categories and any specifics you would like us to capture.
    - Transport errors                                                    
    - Axis faults
    - Security
    - Registry access
    - General errors

The syntax for the sequences would now be as shown below, where the 
onError attribute would specify the name of another sequence

<sequence name="string" [onError="string"]>

    A sequence reference will not be able to override the error handler 
already defined on the sequence definition.
    If a sequence does not provide an error handler, or the error 
handler itself throws another exception, the parent sequences' error 
handler would be invoked.
    The message context would only keep information about the *last* 
exception, and a new exception would overwrite any previous information

2. Try mediator

The new Try mediator would be similar to the Java try-catch-finally 
where the catch clause traps all exceptions. Its syntax would be

The Try mediator is a List mediator, but with two additional lists of 
mediators to be invoked on an error, and finally. The finally block is 
optional to the mediator.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message