From 13f3b1cccebd6ceeec0ce7f1794201f8d0e31d1c Mon Sep 17 00:00:00 2001 From: df Date: Sun, 18 Oct 2020 19:19:26 +0000 Subject: [PATCH] Raise the "database locked" error from caller context --- webif/lib/settings.class | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/webif/lib/settings.class b/webif/lib/settings.class index 5b561850..fa74b117 100644 --- a/webif/lib/settings.class +++ b/webif/lib/settings.class @@ -62,8 +62,14 @@ proc {settings _safer_query} { queryText args } { try { return [$settingsdb query $queryText {*}$arg] } on error {msg opts} { - if {[string first "database is locked" $msg] >= 0 && [incr lockCnt -1] > 0} { - continue + if {[string first "database is locked" $msg] >= 0} { + if {[incr lockCnt -1] > 0} { + continue + } else { + # raise error from caller + set msg "Persistently unable to access Settings: database locked" + incr opts(-level) + } } return {*}$opts $msg }