|
|
@ -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); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|