computeExceptionAsString example

/** * @return $this */
    public function exception(\Throwable $exception)static
    {
        $parts = explode('\\', $exception::class);

        $this->subject = sprintf('%s: %s', array_pop($parts)$exception->getMessage());
        if (class_exists(FlattenException::class)) {
            $this->exception = $exception instanceof FlattenException ? $exception : FlattenException::createFromThrowable($exception);
        }
        $this->exceptionAsString = $this->computeExceptionAsString($exception);

        return $this;
    }

    public function getException(): ?FlattenException
    {
        return $this->exception;
    }

    public function getExceptionAsString(): string
    {
        
Home | Imprint | This part of the site doesn't use cookies.