From 9ac1fea98a496567258f18c84813beb275287c1d Mon Sep 17 00:00:00 2001 From: Will Budic Date: Thu, 20 Feb 2020 18:36:15 +1100 Subject: [PATCH] Exc. handling throws. --- htdocs/cgi-bin/config.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/cgi-bin/config.cgi b/htdocs/cgi-bin/config.cgi index 602bf16..86b3fb8 100755 --- a/htdocs/cgi-bin/config.cgi +++ b/htdocs/cgi-bin/config.cgi @@ -751,7 +751,7 @@ try{ $db->do('COMMIT;'); $db->disconnect(); - $db = DBI->connect($dsn, $userid, $pass, { RaiseError => 1 }) or die "

Error->"& $DBI::errstri &"

"; + $db = DBI->connect($dsn, $userid, $pass, { RaiseError => 1 }) or LifeLogException->throw($DBI::errstri); $dbs = $db->do("VACUUM;"); @@ -763,7 +763,7 @@ try{ } catch{ $db->do('ROLLBACK;'); - die qq(@&processDBFix error -> $_ with statement->$sql for $date update counter:$cntr_upd); + LifeLogException->throw(error=>qq(@&processDBFix error -> $_ with statement->[$sql] for $date update counter:$cntr_upd \nERROR->$@),show_trace=>1); } } -- 2.34.1