Augment exception handler to allow users to add extra information to error messages.
r2841 | ffr | 2009-12-10 14:57:13 +1100 (Thu, 10 Dec 2009) | 2 lines
This commit is contained in:
committed by
Douglas Clowes
parent
d8cd96b69b
commit
f494ece7e7
@@ -1,7 +1,7 @@
|
||||
# Some useful functions for SICS configuration.
|
||||
|
||||
# $Revision: 1.23 $
|
||||
# $Date: 2009-12-09 06:07:45 $
|
||||
# $Revision: 1.24 $
|
||||
# $Date: 2009-12-10 03:57:13 $
|
||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||
# Last revision by $Author: ffr $
|
||||
|
||||
@@ -882,7 +882,7 @@ proc hsibPath {sibling} {
|
||||
# @param status, the status returned by the 'catch' command.
|
||||
# @param message, the message set by the 'catch' command.
|
||||
#
|
||||
# Call this as the last command in the command block or
|
||||
# Call this as the last command in the command block or
|
||||
# for loop which encloses the 'catch'
|
||||
proc handle_exception {status message args} {
|
||||
switch $status {
|
||||
@@ -891,7 +891,7 @@ proc handle_exception {status message} {
|
||||
# bottom of a 'catch' command.
|
||||
return -code ok
|
||||
}
|
||||
1 {
|
||||
1 {
|
||||
# TCL_ERROR
|
||||
return -code error "([info level -1]) $message: $args"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user