public function throwToStdout($exception, $full = true, $asJson = false)
    {
        $httpCode = method_exists($exception, 'getHttpCode') ? call_user_func([$exception, 'getHttpCode']) : 500;
        $logger = $this->getStdioLogger();
        $message = $this->getExceptionData($exception, $full, true);
        if ($logger) {
            $logger->error($message, [], 1);
        } else {
            echo $message;
        }
        if ($asJson) {
            $exceptionData = $this->getExceptionData($exception, $full, false);
        } else {
            $exceptionData = 'Error: ' . $exception->getMessage();
        }
        return $this->getResponse($httpCode, [], $exceptionData);
    }
public function throwToStdout($exception, $full = true, $asJson = false)
    {
        $httpCode = method_exists($exception, 'getHttpCode') ? call_user_func([$exception, 'getHttpCode']) : 500;
        $logger = $this->getStdioLogger();
        $message = $this->getExceptionData($exception, $full, true);
        if ($logger) {
            $logger->error($message, [], 1);
        } else {
            echo $message;
        }
        if ($asJson) {
            $exceptionData = $this->getExceptionData($exception, $full, false);
        } else {
            $exceptionData = 'Error: ' . $exception->getMessage();
        }
        return $this->getResponse($httpCode, [], $exceptionData);
    }
public function throwToStdout ( $ exception , $ full = true , $ asJson = false ) { $ httpCode = method_exists ( $ exception , 'getHttpCode' ) ? call_user_func ( [ $ exception , 'getHttpCode' ] ) : 500 ; $ logger = $ this -> getStdioLogger ( ) ; $ message = $ this -> getExceptionData ( $ exception , $ full , true ) ; if ( $ logger ) { $ logger -> error ( $ message , [ ] , 1 ) ; } else { echo $ message ; } if ( $ asJson ) { $ exceptionData = $ this -> getExceptionData ( $ exception , $ full , false ) ; } else { $ exceptionData = 'Error: ' . $ exception -> getMessage ( ) ; } return $ this -> getResponse ( $ httpCode , [ ] , $ exceptionData ) ; }
Throw error description to Stdout
@param \Throwable $exception
@param bool       $full
@param bool       $asJson
@return Response
Throw error description to Stdout