catch exceptions in the server proc, to be able to kill the entire chain of running servers

This commit is contained in:
Pieter Noordhuis
2010-06-02 21:20:29 +02:00
parent d55d5c5dd3
commit 436f18b618
3 changed files with 36 additions and 18 deletions

View File

@ -92,4 +92,12 @@ proc main {} {
cleanup
}
main
if {[catch { main } err]} {
if {[string length $err] > 0} {
# only display error when not generated by the test suite
if {$err ne "exception"} {
puts $err
}
exit 1
}
}