17 if (!defined(
'ADODB_ERROR_HANDLER_TYPE')) define(
'ADODB_ERROR_HANDLER_TYPE',
E_USER_ERROR);
18 define(
'ADODB_ERROR_HANDLER',
'adodb_throw');
28 function __construct($dbms, $fn, $errno, $errmsg, $p1, $p2, $thisConnection)
34 $s =
"$dbms error: [$errno: $errmsg] in $fn(\"$p1\")\n";
39 $user = $thisConnection->user;
40 $s =
"$dbms error: [$errno: $errmsg] in $fn($p1, '$user', '****', $p2)\n";
43 $s =
"$dbms error: [$errno: $errmsg] in $fn($p1, $p2)\n";
48 if ($thisConnection) {
49 $this->host = $thisConnection->host;
50 $this->database = $thisConnection->database;
55 if (!is_numeric($errno)) $errno = -1;
56 parent::__construct($s,$errno);
73 global $ADODB_EXCEPTION;
75 if (error_reporting() == 0)
return;
76 if (is_string($ADODB_EXCEPTION)) $errfn = $ADODB_EXCEPTION;
77 else $errfn =
'ADODB_EXCEPTION';
78 throw new $errfn(
$dbms,
$fn, $errno, $errmsg, $p1, $p2, $thisConnection);
if(!defined('ADODB_ERROR_HANDLER_TYPE')) define('ADODB_ERROR_HANDLER_TYPE' E_USER_ERROR
adodb_throw($dbms, $fn, $errno, $errmsg, $p1, $p2, $thisConnection)
__construct($dbms, $fn, $errno, $errmsg, $p1, $p2, $thisConnection)