diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2018-05-28 21:41:16 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2018-05-28 21:45:50 -0400 |
commit | 99ac07fd4690a9f024a560e943106a989cf6d4ae (patch) | |
tree | eeffaac3ec898788ee2717db8067261b8e172bfd /GradeBook_lib.tcl | |
parent | ae0c73dfb66b414e4dc1da09532fbac4e62643f2 (diff) | |
download | GradeBook-99ac07fd4690a9f024a560e943106a989cf6d4ae.tar.gz GradeBook-99ac07fd4690a9f024a560e943106a989cf6d4ae.zip |
if GradingSchemeTable cannot be created do not spam in the html output or log
Diffstat (limited to 'GradeBook_lib.tcl')
-rwxr-xr-x | GradeBook_lib.tcl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl index 6565a5b..11280ee 100755 --- a/GradeBook_lib.tcl +++ b/GradeBook_lib.tcl @@ -66,9 +66,13 @@ proc get_default_grading_scheme {} { proc CreateGradingSchemeTable {db} { begin_db_transaction set err [catch {db eval {CREATE TABLE GradingSchemeTable(LetterGrade text, LowerCutoff real)} } errStat] - if { $err } { - htmlErrorMsg $errStat - dbg "Could not create GradingSchemeTable: $errStat" msg_level_critical [lindex [info level 0] 0] + if { $err} { + if { $errStat ne "attempt to write a readonly database" } { + htmlErrorMsg $errStat + dbg "Could not create GradingSchemeTable: $errStat" msg_level_critical [lindex [info level 0] 0] + } else { + dbg "Could not create GradingSchemeTable: $errStat" msg_level_info [lindex [info level 0] 0] + } end_db_transaction; return } foreach {letter cutoff} [get_default_grading_scheme] { |