mirror of
https://github.com/predis/predis.git
synced 2026-08-22 14:31:12 +00:00
21 lines
443 B
PHP
21 lines
443 B
PHP
<?php
|
|
|
|
namespace Predis;
|
|
|
|
class ServerException extends PredisException {
|
|
private $_errorType;
|
|
|
|
public function __construct($message) {
|
|
parent::__construct($message);
|
|
$this->_errorType = substr($message, 0, strpos($message, ' '));
|
|
}
|
|
|
|
public function toResponseError() {
|
|
return new ResponseError($this->getMessage());
|
|
}
|
|
|
|
public function getErrorType() {
|
|
return $this->_errorType;
|
|
}
|
|
}
|