Raise the "database locked" error from caller context
This commit is contained in:
parent
3981bbd37e
commit
13f3b1ccce
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user