Tom Grundy
Tom Grundy

Reputation: 826

tcl : exit or error without displaying code?

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?

Upvotes: 0

Views: 368

Answers (1)

Str.
Str.

Reputation: 1439

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.

Upvotes: 1

Related Questions