Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/kernel/db/db_connection.php
Show First 20 Lines • Show All 387 Lines • ▼ Show 20 Line(s) | |||||
* Sends db error to a predefined error handler | * Sends db error to a predefined error handler | ||||
* | * | ||||
* @param $sql | * @param $sql | ||||
* @return bool | * @return bool | ||||
* @access protected | * @access protected | ||||
*/ | */ | ||||
protected function callErrorHandler($sql) | protected function callErrorHandler($sql) | ||||
{ | { | ||||
return call_user_func($this->errorHandler, $this->errorCode, $this->errorMessage, $sql); | $error_msg = $this->errorMessage; | ||||
// Specify slave servers or nothing for master/single database setups. | |||||
if ( $this->serverIndex ) { | |||||
$error_msg = '[Server #' . $this->serverIndex . '] ' . $error_msg; | |||||
} | |||||
return call_user_func( | |||||
$this->errorHandler, | |||||
$this->errorCode, | |||||
$error_msg, | |||||
$sql | |||||
); | |||||
} | } | ||||
/** | /** | ||||
* Default error handler for sql errors | * Default error handler for sql errors | ||||
* | * | ||||
* @param int $code | * @param int $code | ||||
* @param string $msg | * @param string $msg | ||||
* @param string $sql | * @param string $sql | ||||
▲ Show 20 Lines • Show All 1047 Lines • Show Last 20 Lines |