Pivot
  1. Pivot
  2. PIVOT-769

A Task's TaskListener will not be called if a Throwable is thown when the task is executed

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.1
    • Component/s: core-util
    • Labels:
      None

      Description

      org.apache.pivot.util.concurrent.Task.ExecuteCallback.run() only catches and records Exceptions as 'faults'.

      try

      { result = execute(); }

      catch(Exception exception)

      { fault = exception; }

      If a java.lang.Error or other non-Exception Throwable is thrown while the task is executing, the thread will be killed off and neither of the TaskListener callback methods will be executed.
      Also, nothing will be logged to syserr, sysout or elsewhere meaning the Throwable is 'swallowed' without any notification.

        Activity

        Chris Bartlett created issue -
        Chris Bartlett made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Chris Bartlett [ cbartlett ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Chris Bartlett
            Reporter:
            Chris Bartlett
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development