Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
enh(log): improve message sent to the log
Browse files Browse the repository at this point in the history
  • Loading branch information
sc979 committed Jan 6, 2020
1 parent cf0dd3d commit 822128a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions www/install/php/Update-20.04.0-beta.1.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,11 @@
$centreonLog->insertLog(4, $versionOfTheUpgrade . "Successful update");
} catch (\Exception $e) {
$pearDB->rollBack();
$msg = $versionOfTheUpgrade . $errorMessage . " - Error : " . $e->getMessage();
$centreonLog->insertLog(4, $msg);
throw new \Exception($msg, (int)$e->getCode(), $e);
$centreonLog->insertLog(
4,
$versionOfTheUpgrade . $errorMessage . " - Code : " . (int)$e->getCode() . " - Error : " . $e->getMessage()
);
throw new \Exception($versionOfTheUpgrade . $errorMessage, (int)$e->getCode(), $e);
}

/*
Expand All @@ -144,6 +146,7 @@
} catch (\Exception $e) {
$centreonLog->insertLog(
4,
$versionOfTheUpgrade . "Unable to set default contact_autologin_key. No error was thrown."
$versionOfTheUpgrade . "Unable to set default contact_autologin_key. - Code : " . (int)$e->getCode() .
"- Error : " . $e->getMessage()
);
}

0 comments on commit 822128a

Please sign in to comment.