tcl : exit or error without displaying code?

410 views Asked by At

We have an 'exit -1' command inside a conditional which is nested down inside a few more levels of conditionals.

On redhat linux 5.8, after exiting at the 'exit -1', all of the surrounding / enclosing lines of code are displayed, all the way up to the top level enclosing conditional / enclosing set of braces.

We see the same behavior when using 'error' in place of 'exit'.

Is there a way to suppress this display?

1

There are 1 answers

0
Str. On

The manual says "exit terminates the running process", so if this causes code to be displayed your setup must be more complex than you said.

Guessing: your script is executed by another script, the first one blows up at receiving returncode 255 (result of exit -1).

Using error would cause a stack trace to be shown - expected behavior.