Run error_log before sending error mail
This commit is contained in:
parent
2fd7511218
commit
8394bf54b9
|
@ -222,6 +222,13 @@ final class MDErrorReporter {
|
||||||
*/
|
*/
|
||||||
public function sendErrorReport(Throwable $exception, string $recipient, string $addDesc = ""):void {
|
public function sendErrorReport(Throwable $exception, string $recipient, string $addDesc = ""):void {
|
||||||
|
|
||||||
|
// First, write the error to the general error log. This should happen first,
|
||||||
|
// so that it will also work if there is a problem retrieving GPG keys.
|
||||||
|
|
||||||
|
\error_log((string)$exception);
|
||||||
|
|
||||||
|
// Second, a mail is generated and sent.
|
||||||
|
|
||||||
$subject = \get_class($exception) . ": " . $exception->getCode();
|
$subject = \get_class($exception) . ": " . $exception->getCode();
|
||||||
|
|
||||||
$description = $addDesc;
|
$description = $addDesc;
|
||||||
|
@ -238,8 +245,6 @@ final class MDErrorReporter {
|
||||||
$additionalContextInfo
|
$additionalContextInfo
|
||||||
);
|
);
|
||||||
|
|
||||||
\error_log((string)$exception);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user