public function getError()
    {
        if($this->isError() || $this->isDeclined())
        {
            return new PaynetException($this->getErrorMessage(), $this->getErrorCode());
        }
        else
        {
            throw new RuntimeException('Response has no error');
        }
    }
public function getError()
    {
        if($this->isError() || $this->isDeclined())
        {
            return new PaynetException($this->getErrorMessage(), $this->getErrorCode());
        }
        else
        {
            throw new RuntimeException('Response has no error');
        }
    }
public function getError ( ) { if ( $ this -> isError ( ) || $ this -> isDeclined ( ) ) { return new PaynetException ( $ this -> getErrorMessage ( ) , $ this -> getErrorCode ( ) ) ; } else { throw new RuntimeException ( 'Response has no error' ) ; } }
Get response error as Exception instance

@return      \PaynetEasy\PaynetEasyApi\Exception\PaynetException        Response error

@throws      \RuntimeException                                   Response has no error
Get response error as Exception instance