abstract protected function closeConnection();
/**
- * @param string $error Fallback error message, used if none is given by DB
+ * @deprecated since 1.32
+ * @param string $error Fallback message, if none is given by DB
* @throws DBConnectionError
*/
public function reportConnectionError( $error = 'Unknown error' ) {
- $myError = $this->lastError();
- if ( $myError ) {
- $error = $myError;
- }
-
- # New method
- throw new DBConnectionError( $this, $error );
+ call_user_func( $this->deprecationLogger, 'Use of ' . __METHOD__ . ' is deprecated.' );
+ throw new DBConnectionError( $this, $this->lastError() ?: $error );
}
/**