protected function getErrorData(\Throwable $exception)
    {
        $data = [
            'message' => $exception->getMessage(),
            'code' => $exception instanceof HttpExceptionInterface ? $exception->statusCode : $exception->getCode(),
            'name' => $this->getExceptionName($exception),
        ];
        if (Reaction::isDebug() || Reaction::isDev()) {
            $data['file'] = $exception->getFile();
            $data['line'] = $exception->getLine();
            $data['trace'] = $exception->getTraceAsString();
        }
        return $data;
    }
protected function getErrorData(\Throwable $exception)
    {
        $data = [
            'message' => $exception->getMessage(),
            'code' => $exception instanceof HttpExceptionInterface ? $exception->statusCode : $exception->getCode(),
            'name' => $this->getExceptionName($exception),
        ];
        if (Reaction::isDebug() || Reaction::isDev()) {
            $data['file'] = $exception->getFile();
            $data['line'] = $exception->getLine();
            $data['trace'] = $exception->getTraceAsString();
        }
        return $data;
    }
protected function getErrorData ( \ Throwable $ exception ) { $ data = [ 'message' => $ exception -> getMessage ( ) , 'code' => $ exception instanceof HttpExceptionInterface ? $ exception -> statusCode : $ exception -> getCode ( ) , 'name' => $ this -> getExceptionName ( $ exception ) , ] ; if ( Reaction :: isDebug ( ) || Reaction :: isDev ( ) ) { $ data [ 'file' ] = $ exception -> getFile ( ) ; $ data [ 'line' ] = $ exception -> getLine ( ) ; $ data [ 'trace' ] = $ exception -> getTraceAsString ( ) ; } return $ data ; }
Get error data as array
@param \Throwable $exception
@return array
Get error data as array