Predis\Response\ErrorInterface::getErrorType PHP Méthode

getErrorType() public méthode

Returns the error type (e.g. ERR, ASK, MOVED).
public getErrorType ( ) : string
Résultat string
    public function getErrorType();

Usage Example

Exemple #1
0
 /**
  * Handles -ERR responses returned by Redis.
  *
  * @param CommandInterface       $command  Redis command that generated the error.
  * @param ErrorResponseInterface $response Instance of the error response.
  *
  * @throws ServerException
  *
  * @return mixed
  */
 protected function onErrorResponse(CommandInterface $command, ErrorResponseInterface $response)
 {
     if ($command instanceof ScriptCommand && $response->getErrorType() === 'NOSCRIPT') {
         $eval = $this->createCommand('EVAL');
         $eval->setRawArguments($command->getEvalArguments());
         $response = $this->executeCommand($eval);
         if (!$response instanceof ResponseInterface) {
             $response = $command->parseResponse($response);
         }
         return $response;
     }
     if ($this->options->exceptions) {
         throw new ServerException($response->getMessage());
     }
     return $response;
 }
All Usage Examples Of Predis\Response\ErrorInterface::getErrorType