TABLE OF CONTENTS
::pwtk::error
SYNOPSIS
proc ::pwtk::error {msg {exit_status 0}} {
DESCRIPTION
Print the error message and exit if exit_status >= 0.
ARGUMENTS
- msg -- error message to print to stderr
- exit_status -- (as the name suggests)
SOURCE
global debug if { [info level] > 1 } { set prefixMsg "from [lindex [info level -1] 0] : " } else { set prefixMsg "from top-level : " } ::tclu::errorDialog "${prefixMsg}\n$msg" if { $exit_status } { if { [info exists debug] && $debug } { ::error $msg } else { puts stderr "Aborting ..." exit $exit_status } } }