title: grails web flow exception handling
body: <p>In my Grails app, I have defined the following (simplified) web flow</p>
  
  <pre><code>def registerFlow = {
  
      start {
          action {RegistrationCommand cmd -&gt;                
  
              try {
                  memberService.validateRegistrationCommandDTO(cmd)
  
              } catch (MemberException ex) {
                  flow.regErrorCode = ex.errorCode
                  throw ex
              }
          }
  
          on("success").to "survey"  // The 'survey' state has been omitted
          on(MemberException).to "handleRegMemberException"
          on(Exception).to "handleUnexpectedException"
      }
  
      handleRegMemberException {
          action {
              // Implementation omitted
          }
      }
  
      handleUnexpectedException {
          redirect(controller:'error', action:'serverError')
      }
  }
  </code></pre>
  
  <p>If a MemberException is thrown by the "start" state, execution should proceed to the "handleRegMemberException" state, but it doesn't. Is there something wrong with my flow definition, or my understanding of how this should work?</p>
  
  <p>Thanks,
  Don</p>