aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2012-01-20 22:50:41 -0500
committerEugeniy Mikhailov <evgmik@gmail.com>2012-01-20 22:50:41 -0500
commit88c28044d943668228f413ee242a731f1c3762d6 (patch)
tree48d8bd9d3233d9e68bb96a16b7c21048d04c3643
parent0b440328e24dc45c187363f065fd4e6ec7e8cb1c (diff)
downloadGradeBook-88c28044d943668228f413ee242a731f1c3762d6.tar.gz
GradeBook-88c28044d943668228f413ee242a731f1c3762d6.zip
Trying to better catch missing tcl packages
-rwxr-xr-xGradeBook.tcl12
1 files changed, 10 insertions, 2 deletions
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]