|
@@ -3,7 +3,12 @@ namespace Predis;
|
|
|
|
|
|
class PredisException extends \Exception { }
|
|
class PredisException extends \Exception { }
|
|
class ClientException extends PredisException { } // Client-side errors
|
|
class ClientException extends PredisException { } // Client-side errors
|
|
-class ServerException extends PredisException { } // Server-side errors
|
|
|
|
|
|
+
|
|
|
|
+class ServerException extends PredisException { // Server-side errors
|
|
|
|
+ public function toResponseError() {
|
|
|
|
+ return new ResponseError($this->getMessage());
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
|
|
class CommunicationException extends PredisException { // Communication errors
|
|
class CommunicationException extends PredisException { // Communication errors
|
|
private $_connection;
|
|
private $_connection;
|
|
@@ -2280,4 +2285,4 @@ class Discard extends \Predis\InlineCommand {
|
|
public function canBeHashed() { return false; }
|
|
public function canBeHashed() { return false; }
|
|
public function getCommandId() { return 'DISCARD'; }
|
|
public function getCommandId() { return 'DISCARD'; }
|
|
}
|
|
}
|
|
-?>
|
|
|
|
|
|
+?>
|