util::catch_exec (public)

 util::catch_exec command result_var

Defined in packages/acs-tcl/tcl/utilities-procs.tcl

Catch a call to Tcl exec. Handle shell return codes consistently. Works like catch. The result of the exec is put into the variable named in result_var. Inspired by https://wiki.tcl-lang.org/1039

Parameters:
command (required)
A list of arguments to pass to exec
result_var (required)
Variable name in caller's scope to set the result in
Returns:
0 or 1. 0 if no error, 1 if an error occurred. If an error occurred the error message will be put into result_var in the caller's scope.
Author:
Dave Bauer
Created:
2008-01-28

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.
[ show source ]
Show another procedure: