protected function setTraceAndGetMessage($error, bool $appendStackTraceToMessage = false): string
    {
        $error = is_string($error) ? json_decode($error, true) : $error;

        $this->originalTrace = $error['stack'] ?? null;

        $message = $error['message'];

        if ($appendStackTraceToMessage) {
            $message .= "\n\n".$error['stack'];
        }

        return $message;
    }
protected function setTraceAndGetMessage($error, bool $appendStackTraceToMessage = false): string
    {
        $error = is_string($error) ? json_decode($error, true) : $error;

        $this->originalTrace = $error['stack'] ?? null;

        $message = $error['message'];

        if ($appendStackTraceToMessage) {
            $message .= "\n\n".$error['stack'];
        }

        return $message;
    }
protected function setTraceAndGetMessage ( $ error , bool $ appendStackTraceToMessage = false ) : string { $ error = is_string ( $ error ) ? json_decode ( $ error , true ) : $ error ; $ this -> originalTrace = $ error [ 'stack' ] ?? null ; $ message = $ error [ 'message' ] ; if ( $ appendStackTraceToMessage ) { $ message .= "\n\n" . $ error [ 'stack' ] ; } return $ message ; }
Set the original trace and return the message.
Set the original trace and return the message .