11.5. Exceptions Raised During Task Communication


An exception can be propagated to a task communicating, or attempting to communicate, with another task. An exception can also be propagated to a calling task if the exception is raised during a rendezvous.

When a task calls an entry of another task, the exception TASKING_ERROR is raised in the calling task, at the place of the call, if the called task is completed before accepting the entry call or is already completed at the time of the call.

A rendezvous can be completed abnormally in two cases:

  1. When an exception is raised within an accept statement, but not handled within an inner frame. In this case, the execution of the accept statement is abandoned and the same exception is raised again immediately after the accept statement within the called task; the exception is also propagated to the calling task at the point of the entry call.

  2. When the task containing the accept statement is completed abnormally as the result of an abort statement. In this case, the exception TASKING_ERROR is raised in the calling task at the point of the entry call.

On the other hand, if a task issuing an entry call becomes abnormal (as the result of an abort statement) no exception is raised in the called task. If the rendezvous has not yet started, the entry call is cancelled. If the rendezvous is in progress, it completes normally, and the called task is unaffected.

References: abnormal task, abort statement, accept statement, completed task, entry call, exception, frame, rendezvous, task, task termination, tasking_error exception.