Reordered the logger statement in the case where the rest of the execution fails for whatever reason

This commit is contained in:
netkas 2025-02-19 14:51:13 -05:00
parent 6001e85160
commit 0a773101d2

View file

@ -676,6 +676,11 @@
*/
private static function returnError(int $responseCode, StandardError $standardError, ?string $message=null, ?Throwable $e=null): void
{
if($e !== null)
{
Logger::getLogger()->error($message, $e);
}
if($message === null)
{
$message = $standardError->getMessage();
@ -690,11 +695,6 @@
{
print(PHP_EOL . PHP_EOL . Utilities::throwableToString($e));
}
if($e !== null)
{
Logger::getLogger()->error($message, $e);
}
}
/**