Hello,
when investigating one of the Sailfin issue, I found that current
DefaultProtocolChain exception control could be improved.
Think we should catch *all* types of Exceptions on execution phase and
call postExecute on all filters, which were passed before exception
happened.
Here is proposed fix attached.
Thanks.
WBR,
Alexey.
Index: DefaultProtocolChain.java
===================================================================
--- DefaultProtocolChain.java (revision 690)
+++ DefaultProtocolChain.java (working copy)
@@ -88,7 +88,9 @@
for (int i=0; i < size; i++){
try{
invokeNext = protocolFilters.get(i).execute(ctx);
- } catch (IOException ex){
+ } catch (Exception ex){
+ invokeNext = false;
+ i--;
Controller.logger().log(Level.SEVERE,
"ProtocolChain exception",ex);
}
@@ -114,7 +116,7 @@
try{
tmpHandler = protocolFilters.get(i);
invokeNext = tmpHandler.postExecute(ctx);
- } catch (IOException ex){
+ } catch (Exception ex){
Controller.logger().log(Level.SEVERE,
"ProtocolChain exception",ex);
}