Commit bfa7c801 by Carsten Brandt

improved redis error message

parent 12217a3e
...@@ -263,8 +263,8 @@ class Connection extends Component ...@@ -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);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment