Skip to content

Commit 4b3df21

Browse files
committed
Log exception
1 parent 33bda07 commit 4b3df21

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/services/SseService.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,8 @@ public function throwException(Throwable $exception): void
287287
$this->getEventStream(function() use ($exception) {
288288
/** @var ErrorHandler $errorHandler */
289289
$errorHandler = Craft::$app->getErrorHandler();
290+
$errorHandler->logException($exception);
291+
290292
if ($errorHandler->showExceptionDetails()) {
291293
$event = new PatchElements($errorHandler->renderFile($errorHandler->exceptionView, [
292294
'exception' => $exception,
@@ -295,6 +297,7 @@ public function throwException(Throwable $exception): void
295297
$message = Craft::t('app', 'A server error occurred.');
296298
$event = new ExecuteScript('console.error(' . json_encode($message) . ');');
297299
}
300+
298301
echo $event->getOutput();
299302
})->send();
300303

0 commit comments

Comments
 (0)