DEVELOPMENT EDITION · 769442725406
Diagnostics Reference
On this page

B2025: Exceptional_Cases on a public operation of an enclave

Catalog status: active. Default severity: error. Stable name: enclave-exceptional. Family: Types and constraints.

The public operations of a proof enclave propagate no exceptions: an exceptional exit would leave the invariants, the state invariant and the frame unproved, and every raise inside the enclave must be proved unreachable.

Example (Vada)

package Lists
  with Annotate => (Verada, Enclave)
is
   type List is limited private;
   Full : exception;
   procedure Grow (L : in out List)
     with Exceptional_Cases => (Full => True);
   ...

What to do (Vada)

Report the failure in the result instead (a Boolean out parameter, or a status), or give the operation a precondition that rules it out.

Regression source and further reading

Complete regression example: source, command arguments and expected results. The fixture deliberately reproduces this diagnostic.

See types and constraints, the code index, and diagnostic interpretation for modes, replay, fix-its and JSON.