Forum Discussion

SeanM's avatar
SeanM
Icon for Nimbostratus rankNimbostratus
Mar 15, 2022

Need help. What is exc?

When using this syntax, what is "exc" and what does it do? if { [catch {pool $hostpool} exc] } {
  • Samir's avatar
    Mar 17, 2022

    Here exc is exception handling in the pool assignment request.  catch - Evaluate script and trap exceptional returns.

    catch script ?varName?

    The catch command is used to prevent errors from aborting command interpretation. The catch command calls the Tcl interpreter recursively to execute script, and always returns without raising an error, regardless of any errors that might occur while executing script.

    Hope it will help you.