Browse Source

improved redis error message

tags/2.0.0-beta
Carsten Brandt 11 years ago
parent
commit
bfa7c80129
  1. 4
      extensions/yii/redis/Connection.php

4
extensions/yii/redis/Connection.php

@ -263,8 +263,8 @@ class Connection extends Component
$this->executeCommand('SELECT', [$this->database]); $this->executeCommand('SELECT', [$this->database]);
$this->initConnection(); $this->initConnection();
} else { } else {
\Yii::error("Failed to open DB connection ($connection): " . $errorNumber . ' - ' . $errorDescription, __CLASS__); \Yii::error("Failed to open redis DB connection ($connection): $errorNumber - $errorDescription", __CLASS__);
$message = YII_DEBUG ? 'Failed to open DB connection: ' . $errorNumber . ' - ' . $errorDescription : 'Failed to open DB connection.'; $message = YII_DEBUG ? "Failed to open redis DB connection ($connection): $errorNumber - $errorDescription" : 'Failed to open DB connection.';
throw new Exception($message, $errorDescription, (int)$errorNumber); throw new Exception($message, $errorDescription, (int)$errorNumber);
} }
} }

Loading…
Cancel
Save