The flow should behave as you expect. Something may be wrong with your flow, for example, with a different service error, but it is not clear from your question what is really happening. You say how you expect the flow to behave, and then you say that it does not behave as you expected, but you do not say how it behaves.
I suggest adding some traces to the stream to see what really happens.
By the way, there are some known errors with different versions of grails, and webflows are broken in grails 1.2-M3: http://jira.codehaus.org/browse/GRAILS-5185
Here is my thread, similar to what you programmed:
class SomeController { def index = { redirect(action:'someProcess') } def someProcessFlow = { start{ action{ dosome -> println "-> inside start action closure" try{ println "-> throwing IllegalArgumentException" throw new IllegalArgumentException() }catch(IllegalArgumentException ex){ println "-> inside catch" throw ex } throw new Exception() "success" } on("success").to "helloPage" on(IllegalArgumentException).to "illegal" on(Exception).to "handleException" } illegal{ action{ println "-> illegal handled" "success" } on("success").to "helloPage" } handleException{ action{ println "-> generic exception handled" "success" } on("success").to "helloPage" } helloPage() } }
It behaves as you expect, and the conclusion is:
-> inside start action closure -> throwing IllegalArgumentException -> inside catch 2009-11-03 11:55:00,364 [http-8080-1] ERROR builder.ClosureInvokingAction - Exception occured invoking flow action: null java.lang.IllegalArgumentException at SomeController$_closure2_closure3_closure6.doCall(SomeController:18) at java.lang.Thread.run(Thread.java:619) -> illegal handled
source share