Ada '83 Language Reference Manual
Copyright 1980, 1982, 1983 owned by the United States Government. Direct reproduction and usage requests to the Ada Information Clearinghouse.
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:
- 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.
- 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.
Rationale references:
13.3.2 The Rendezvous Concept,
14.4.2 Exceptions Raised During Communication Between Tasks,
14.4.4 Example of Exceptions in a Rendezvous
Style Guide references:
5.8.1 Handling Versus Avoiding Exceptions,
6.2.2 Defensive Task Communication
Address any questions or comments to
adainfo@sw-eng.falls-church.va.us.