src/L5SimpleFMBase.php
protected function checkResultForError($result, $commandArrayUsed)
    {
        if (empty($result)) {
            throw new NoResultReturnedException('The SimpleFM request did not return a result.');
        }
        if ($result->getErrorCode() == 401) {
            throw new RecordsNotFoundException($result->getErrorMessage(), $result->getErrorCode(), $result);
        }
        if ($result->getErrorCode() !== 0) {
            $message = $result->getErrorMessage() . ". Command used: " . json_encode($commandArrayUsed);
            throw new GeneralException($message, $result->getErrorCode(), $result);
        }
    }
protected function checkResultForError($result, $commandArrayUsed)
    {
        if (empty($result)) {
            throw new NoResultReturnedException('The SimpleFM request did not return a result.');
        }
        if ($result->getErrorCode() == 401) {
            throw new RecordsNotFoundException($result->getErrorMessage(), $result->getErrorCode(), $result);
        }
        if ($result->getErrorCode() !== 0) {
            $message = $result->getErrorMessage() . ". Command used: " . json_encode($commandArrayUsed);
            throw new GeneralException($message, $result->getErrorCode(), $result);
        }
    }
protected function checkResultForError ( $ result , $ commandArrayUsed ) { if ( empty ( $ result ) ) { throw new NoResultReturnedException ( 'The SimpleFM request did not return a result.' ) ; } if ( $ result -> getErrorCode ( ) == 401 ) { throw new RecordsNotFoundException ( $ result -> getErrorMessage ( ) , $ result -> getErrorCode ( ) , $ result ) ; } if ( $ result -> getErrorCode ( ) !== 0 ) { $ message = $ result -> getErrorMessage ( ) . ". Command used: " . json_encode ( $ commandArrayUsed ) ; throw new GeneralException ( $ message , $ result -> getErrorCode ( ) , $ result ) ; } }
Parses the SimpleFM result and determines if a FileMaker error was thrown.

@param  object A SimpleFM result object
@return none
Parses the SimpleFM result and determines if a FileMaker error was thrown .