mirror of
https://github.com/predis/predis.git
synced 2026-08-26 03:59:49 +00:00
18 lines
352 B
PHP
18 lines
352 B
PHP
<?php
|
|
|
|
namespace Predis;
|
|
|
|
class ServerException extends PredisException implements IRedisServerError
|
|
{
|
|
public function getErrorType()
|
|
{
|
|
list($errorType, ) = explode(' ', $this->getMessage(), 2);
|
|
return $errorType;
|
|
}
|
|
|
|
public function toResponseError()
|
|
{
|
|
return new ResponseError($this->getMessage());
|
|
}
|
|
}
|