Errors inside indirection usage while in the direct mode using $ETRAP return control to the direct mode prompt

Final Release Note

Errors inside indirection usage (@ syntax) while in the direct mode using $ETRAP return control to the direct mode prompt after executing the $ETRAP error handler. Previously, such errors caused the mumps process to abruptly terminate. [#324 (closed)]

Description

Below is a simple test case describing the issue. When z=1/0 is done without using indirection (@ syntax), the DIVZERO error is displayed and control returns to the YDB prompt. But when the same is done inside indirection, the DIVZERO error is displayed and control returns back to the shell (i.e. the mumps process got abruptly terminated).

SHELL> $ydb_dist/mumps -direct
YDB>set $etrap="write $zstatus,!",z=1/0
%YDB-E-DIVZERO, Attempt to divide by zero

YDB>set $etrap="write $zstatus,!",@"z=1/0"
150373210,+1^GTM$DMOD,%YDB-E-DIVZERO, Attempt to divide by zero
SHELL>

This seems to be a day-one issue in the code where any errors inside an indirection usage while in direct mode are considered as non-direct-mode actions and so get handled differently in case of an error.

Draft Release Note

Errors inside indirection usage (@ syntax) while in the direct mode (i.e. YDB> prompt) and using $ETRAP return control back to the YDB> prompt after executing the $ETRAP error handler. Previously, this usage caused the mumps process to abruptly terminate.

Edited by K.S. Bhaskar