Error: {what} is not allowed in {context} (IRIS: {iris})
A form IRIS refuses where it stands, named with IRIS’s own error: an error trap set inside a
Try block, a * or routine-qualified $ZTRAP value in a procedure block, an offset in a
trap label, a Goto in a procedure block whose label is indirect (Goto @target) or
carries an offset (Goto Done+1), a Do there with an offset to a label of the block
(Do Done+1), a New of a special variable other than $ESTACK,
$ETRAP, $NAMESPACE and $ROLES. ZQUIT in a procedure block with private variables is
the one IRIS compiles, to raise <COMMAND> when it runs. In the example the Catch already
handles the error, so the trap goes.
IRIS rejects the example.
Class Demo.NotAllowedIn
{
ClassMethod Parse(text As %String) As %Integer
{
Try {
Set $ZTrap = "Fail" //! A4304
Return +text
} Catch ex {
Return -1
}
Fail
Return 0
}
}