src/Viserio/Component/Exception/ErrorHandler.php
public function report(Throwable $exception): void
    {
        if ($this->shouldntReport($exception)) {
            return;
        }

        $level = $this->getLevel($exception);
        $id    = ExceptionIdentifier::identify($exception);

        if ($exception instanceof FatalErrorException) {
            if ($exception instanceof FatalThrowableError) {
                $message = $exception->getMessage();
            } else {
                $message = 'Fatal ' . $exception->getMessage();
            }
        } elseif ($exception instanceof ErrorException) {
            $message = 'Uncaught ' . $exception->getMessage();
        } else {
            $message = 'Uncaught Exception: ' . $exception->getMessage();
        }

        $this->logger->{$level}(
            $message,
            ['exception' => $exception, 'identification' => ['id' => $id]]
        );
    }
public function report(Throwable $exception): void
    {
        if ($this->shouldntReport($exception)) {
            return;
        }

        $level = $this->getLevel($exception);
        $id    = ExceptionIdentifier::identify($exception);

        if ($exception instanceof FatalErrorException) {
            if ($exception instanceof FatalThrowableError) {
                $message = $exception->getMessage();
            } else {
                $message = 'Fatal ' . $exception->getMessage();
            }
        } elseif ($exception instanceof ErrorException) {
            $message = 'Uncaught ' . $exception->getMessage();
        } else {
            $message = 'Uncaught Exception: ' . $exception->getMessage();
        }

        $this->logger->{$level}(
            $message,
            ['exception' => $exception, 'identification' => ['id' => $id]]
        );
    }
Report or log an exception.

@param \Throwable $exception

@return void