From 88c28044d943668228f413ee242a731f1c3762d6 Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Fri, 20 Jan 2012 22:50:41 -0500 Subject: Trying to better catch missing tcl packages --- GradeBook.tcl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'GradeBook.tcl') diff --git a/GradeBook.tcl b/GradeBook.tcl index 33305e8..41f75ba 100755 --- a/GradeBook.tcl +++ b/GradeBook.tcl @@ -4,13 +4,21 @@ exec tclsh "$0" "$@" set err [catch { -###################### Main script begins ################################# # require Tcl version of at least 8.5 since I use 'ni' and 'in' in expressions for lists +package require ncgi package require Tcl 8.5 package require sqlite3 -package require ncgi package require md5 +} errStat ] +if { $err } { + ::ncgi::header + puts "the following error happen: $errStat" + exit +} + +###################### Main script begins ################################# +set err [catch { set execution_start_time [clock microseconds] -- cgit v1.2.3