]> lifelog.hopto.org Git - LifeLog.git/commitdiff
Exc. handling throws.
authorWill Budic <redacted>
Thu, 20 Feb 2020 07:36:15 +0000 (18:36 +1100)
committerWill Budic <redacted>
Thu, 20 Feb 2020 07:36:15 +0000 (18:36 +1100)
htdocs/cgi-bin/config.cgi

index 602bf16d280c8a54ffb426be4393bc2e2239c54d..86b3fb89d45991d393ee2ab96c2330e32056693c 100755 (executable)
@@ -751,7 +751,7 @@ try{
 
         $db->do('COMMIT;');
         $db->disconnect();
-        $db = DBI->connect($dsn, $userid, $pass, { RaiseError => 1 }) or die "<p>Error->"& $DBI::errstri &"</p>";
+        $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);
 }
 }