ona  18.1.1
About: OpenNetAdmin provides a database managed inventory of your IP network (with Web and CLI interface).
  Fossies Dox: ona-18.1.1.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

adodb-errorpear.inc.php
Go to the documentation of this file.
1 <?php
15 include_once('PEAR.php');
16 
17 if (!defined('ADODB_ERROR_HANDLER')) define('ADODB_ERROR_HANDLER','ADODB_Error_PEAR');
18 
19 /*
20 * Enabled the following if you want to terminate scripts when an error occurs
21 */
22 //PEAR::setErrorHandling (PEAR_ERROR_DIE);
23 
24 /*
25 * Name of the PEAR_Error derived class to call.
26 */
27 if (!defined('ADODB_PEAR_ERROR_CLASS')) define('ADODB_PEAR_ERROR_CLASS','PEAR_Error');
28 
29 /*
30 * Store the last PEAR_Error object here
31 */
33 
44 function ADODB_Error_PEAR($dbms, $fn, $errno, $errmsg, $p1=false, $p2=false)
45 {
47 
48  if (error_reporting() == 0) return; // obey @ protocol
49  switch($fn) {
50  case 'EXECUTE':
51  $sql = $p1;
52  $inputparams = $p2;
53 
54  $s = "$dbms error: [$errno: $errmsg] in $fn(\"$sql\")";
55  break;
56 
57  case 'PCONNECT':
58  case 'CONNECT':
59  $host = $p1;
60  $database = $p2;
61 
62  $s = "$dbms error: [$errno: $errmsg] in $fn('$host', ?, ?, '$database')";
63  break;
64 
65  default:
66  $s = "$dbms error: [$errno: $errmsg] in $fn($p1, $p2)";
67  break;
68  }
69 
70  $class = ADODB_PEAR_ERROR_CLASS;
71  $ADODB_Last_PEAR_Error = new $class($s, $errno,
72  $GLOBALS['_PEAR_default_error_mode'],
73  $GLOBALS['_PEAR_default_error_options'],
74  $errmsg);
75 
76  //print "<p>!$s</p>";
77 }
78 
83 function ADODB_PEAR_Error()
84 {
86 
88 }
$errmsg
$errmsg
Definition: dcm.php:47
$sql
$sql
Definition: server.php:84
ADODB_PEAR_Error
ADODB_PEAR_Error()
Definition: adodb-errorpear.inc.php:83
$database
$database
Definition: collate-convert.php:18
$host
$host
Definition: collate-convert.php:19
$ADODB_Last_PEAR_Error
global $ADODB_Last_PEAR_Error
Definition: adodb-errorpear.inc.php:32
ADODB_Error_PEAR
ADODB_Error_PEAR($dbms, $fn, $errno, $errmsg, $p1=false, $p2=false)
Definition: adodb-errorpear.inc.php:44