Uploaded image for project: 'Spring Web Flow'
  1. Spring Web Flow
  2. SWF-1381

FlowExecutionImpl: handleException ignores result of another handleException

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.2.0.RC1
    • Component/s: Core: Flow Executor
    • Labels:
      None

      Description

      method handleException of class org.springframework.webflow.engine.impl.FlowExecutionImpl calls recursively if another exception during processing of original exception happens, but
      no further check about result of exception handling (from recursive method) will be done. As result effort of another exception handling call will be ignored and oldest exception will rethrown

      <code>
      boolean handled = false;
      try {
      if (tryStateHandlers(exception, context) || tryFlowHandlers(exception, context))

      { handled = true; }

      } catch (FlowExecutionException newException)

      { // exception handling itself resulted in a new FlowExecutionException, try to handle it handleException(newException, context); }

      if (!handled) {
      if (logger.isDebugEnabled())

      { logger.debug("Rethrowing unhandled flow execution exception"); }

      throw exception;
      }
      </code>

      One of possible solution is to give method return value or to store variable handled in ThreadLocal, finally do not forget to re-throw latest not original exception if handling completely failed.

        Attachments

          Activity

            People

            Assignee:
            rstoya05-aop Rossen Stoyanchev
            Reporter:
            andriy.vyedyeneyev@gmx.at Andriy Vyedyeneyev
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: