· Apr 18 1m read

How to restore the prompt when an error occurs while running a program in the terminal

InterSystems FAQ rubric

When you run a routine in the terminal and an error occurs in the program, if you have not set the error trap properly, the program will enter debug mode as shown below.

USER>do ^error1
 write A
a+2^error1 *A
USER 2d0>

From this state, enter the Quit command to return to the state before the routine was started.

USER 2d0>Quit

If a transaction is being processed within the routine where the error occurred, a prompt similar to the one below will appear.

USER>do ^error1
 write A
a+3^error1 *A
TL1:USER 2d0>q

If TL+number is displayed at the beginning of the prompt like this, it indicates that there is a transaction that has not been completed.

In this state, even if you enter the Quit command, you will not be returned to the original prompt.

Return to the original prompt by first entering the Trollback command and then executing the Quit command.

Discussion (0)0
Log in or sign up to continue