ascot diagnostics

A4344

Warning: An error here re-enters the handler {var} still names

An error is raised on purpose inside the handler the trap still names, or inside the $ETRAP code itself. It comes from ZTrap, a Throw outside a Try, or $ECODE set to a non-empty value. IRIS compiles it. With $ZTRAP, the new error re-enters the handler, and so on without end. With $ETRAP, it goes up to the caller, and each frame on the way that holds the same $ETRAP runs the handler once more. Clear $ZTRAP first (Set $ZTrap = "") so the error goes to the caller.

IRIS compiles the example.

ROUTINE Demo.TrapReenters
Main
    Set $ZTrap = "Fail"
    Set rate = ^Demo.TrapReenters("rate")
    Write rate, !
    Quit
Fail
    Write "no rate: ", $ZError, !
    ZTrap "RATE" //! A4344

All diagnostics