Predis\Response\ErrorInterface::getMessage PHP Method

getMessage() public method

Returns the error message.
public getMessage ( ) : string
return string
    public function getMessage();

Usage Example

 /**
  * Handles -ERR responses returned by Redis.
  *
  * @param CommandInterface       $command Command that generated the -ERR response.
  * @param ErrorResponseInterface $error   Redis error response object.
  *
  * @return mixed
  */
 protected function onErrorResponse(CommandInterface $command, ErrorResponseInterface $error)
 {
     $details = explode(' ', $error->getMessage(), 2);
     switch ($details[0]) {
         case 'MOVED':
             return $this->onMovedResponse($command, $details[1]);
         case 'ASK':
             return $this->onAskResponse($command, $details[1]);
         default:
             return $error;
     }
 }
All Usage Examples Of Predis\Response\ErrorInterface::getMessage