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

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
        }
    }
}