cvs: php4 /pear DB.php PEAR.php.in /pear/DB common.php ibase.php msql.php mssql.php mysql.php oci8.php odbc.php pgsql.php sybase.php /pear/DB/tests
db_error.phpt db_error2.phpt /pear/tests pear_error.phpt

From: Date: Wed, 13 Sep 2000 11:28:00 +0000
Subject: cvs: php4 /pear DB.php PEAR.php.in /pear/DB common.php ibase.php msql.php mssql.php mysql.php oci8.php odbc.php pgsql.php sybase.php /pear/DB/tests
db_error.phpt db_error2.phpt /pear/tests pear_error.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-1746@lists.php.net to get a copy of this message
ssb Wed Sep 13 04:28:00 2000 EDT Modified files: /php4/pear DB.php PEAR.php.in /php4/pear/DB common.php ibase.php msql.php mssql.php mysql.php oci8.php odbc.php pgsql.php sybase.php /php4/pear/DB/tests db_error.phpt db_error2.phpt /php4/pear/tests pear_error.phpt Log: PEAR: * added $debuginfo parameter to PEAR_Error constructor * put last query in $debuginfo from DB_common::raiseError() @PEAR: add last executed query as debug info in DB errors (Stig) Index: php4/pear/DB.php diff -u php4/pear/DB.php:1.31 php4/pear/DB.php:1.32 --- php4/pear/DB.php:1.31 Mon Sep 11 17:27:50 2000 +++ php4/pear/DB.php Wed Sep 13 04:27:59 2000 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: DB.php,v 1.31 2000/09/12 00:27:50 ssb Exp $ +// $Id: DB.php,v 1.32 2000/09/13 11:27:59 ssb Exp $ // // Database independent query interface. // @@ -469,17 +469,21 @@ * * @param $code mixed DB error code, or string with error message. * @param $mode int what "error mode" to operate in - * @param $level what error level to use for $mode == PEAR_ERROR_TRIGGER + * @param $level what error level to use for $mode & PEAR_ERROR_TRIGGER + * @param $debuginfo additional debug info, such as the last query * * @access public + * + * @see PEAR_Error */ function DB_Error($code = DB_ERROR, $mode = PEAR_ERROR_RETURN, - $level = E_USER_NOTICE) { + $level = E_USER_NOTICE, + $debuginfo = null) { if (is_int($code)) { - $this->PEAR_Error("DB Error: " . DB::errorMessage($code), $code, $mode, $level); + $this->PEAR_Error("DB Error: " . DB::errorMessage($code), $code, $mode, $level, $debuginfo); } else { - $this->PEAR_Error("DB Error: $code", 0, $mode, $level); + $this->PEAR_Error("DB Error: $code", 0, $mode, $level, $debuginfo); } } } @@ -497,16 +501,20 @@ * @param $code mixed DB error code, or string with error message. * @param $mode int what "error mode" to operate in * @param $level what error level to use for $mode == PEAR_ERROR_TRIGGER + * @param $debuginfo additional debug info, such as the last query * * @access public + * + * @see PEAR_Error */ function DB_Warning($code = DB_WARNING, $mode = PEAR_ERROR_RETURN, - $level = E_USER_NOTICE) { + $level = E_USER_NOTICE, + $debuginfo = null) { if (is_int($code)) { - $this->PEAR_Error("DB Warning: " . DB::errorMessage($code), $code, $mode, $level); + $this->PEAR_Error("DB Warning: " . DB::errorMessage($code), $code, $mode, $level, $debuginfo); } else { - $this->PEAR_Error("DB Warning: $code", 0, $mode, $level); + $this->PEAR_Error("DB Warning: $code", 0, $mode, $level, $debuginfo); } } } Index: php4/pear/PEAR.php.in diff -u php4/pear/PEAR.php.in:1.7 php4/pear/PEAR.php.in:1.8 --- php4/pear/PEAR.php.in:1.7 Wed Sep 13 00:39:53 2000 +++ php4/pear/PEAR.php.in Wed Sep 13 04:27:59 2000 @@ -17,7 +17,7 @@ // | Stig Bakken <ssb@fast.no> | // +----------------------------------------------------------------------+ // -// $Id: PEAR.php.in,v 1.7 2000/09/13 07:39:53 ssb Exp $ +// $Id: PEAR.php.in,v 1.8 2000/09/13 11:27:59 ssb Exp $ // define('PEAR_ERROR_RETURN', 1); @@ -144,12 +144,11 @@ var $error_message_prefix = ''; var $error_prepend = ''; var $error_append = ''; - var $mode = PEAR_ERROR_RETURN; var $level = E_USER_NOTICE; var $code = -1; - var $message = ''; + var $debuginfo = ''; // Wait until we have a stack-groping function in PHP. //var $file = ''; @@ -178,14 +177,16 @@ function PEAR_Error($message = 'unknown error', $code = 0, $mode = null, - $options = null) + $options = null, + $debuginfo = null) { if ($mode === null) { $mode = PEAR_ERROR_RETURN; } - $this->message = $message; - $this->code = $code; - $this->mode = $mode; + $this->message = $message; + $this->code = $code; + $this->mode = $mode; + $this->debuginfo = $debuginfo; if ($mode & PEAR_ERROR_CALLBACK) { $this->level = E_USER_NOTICE; $this->callback = $options; @@ -276,6 +277,19 @@ } // }}} + // {{{ getDebugInfo() + + /** + * Get additional debug information supplied by the application. + * + * @return string debug information + */ + function getDebugInfo () + { + return $this->debuginfo; + } + + // }}} // {{{ toString() /** @@ -296,10 +310,12 @@ $callback = $this->callback; } return sprintf('[%s: message="%s" code=%d mode=callback '. - 'callback=%s prefix="%s" prepend="%s" append="%s"]', + 'callback=%s prefix="%s" prepend="%s" append="%s" '. + 'debug="%s"]', get_class($this), $this->message, $this->code, $callback, $this->error_message_prefix, - $this->error_prepend, $this->error_append); + $this->error_prepend, $this->error_append, + $this->debuginfo); } if ($this->mode & PEAR_ERROR_CALLBACK) { $modes[] = "callback"; @@ -316,11 +332,13 @@ if ($this->mode & PEAR_ERROR_RETURN) { $modes[] = "return"; } - return sprintf('[%s: message="%s" code=%d mode=%s level=%s prefix="%s" prepend="%s" append="%s"]', + return sprintf('[%s: message="%s" code=%d mode=%s level=%s prefix="%s" '. + 'prepend="%s" append="%s" debug="%s"]', get_class($this), $this->message, $this->code, implode("|", $modes), $levels[$this->level], $this->error_message_prefix, - $this->error_prepend, $this->error_append); + $this->error_prepend, $this->error_append, + $this->debuginfo); } // }}} Index: php4/pear/DB/common.php diff -u php4/pear/DB/common.php:1.20 php4/pear/DB/common.php:1.21 --- php4/pear/DB/common.php:1.20 Tue Sep 12 03:35:54 2000 +++ php4/pear/DB/common.php Wed Sep 13 04:27:59 2000 @@ -36,6 +36,7 @@ var $error_mode = PEAR_ERROR_RETURN; var $error_level = E_USER_NOTICE; var $error_callback; + var $last_query = ''; // }}} // {{{ toString() @@ -138,7 +139,8 @@ * This method is called by DB to generate an error. * */ - function &raiseError($code = DB_ERROR, $mode = false, $level = false) { + function &raiseError($code = DB_ERROR, $mode = false, $level = false, + $debuginfo = false) { if (!$mode) { $mode = $this->error_mode; } @@ -153,7 +155,10 @@ $level = $this->error_level; } } - return new DB_Error($code, $mode, $level); + if (!$debuginfo) { + $debuginfo = $this->last_query; + } + return new DB_Error($code, $mode, $level, $debuginfo); } // }}} Index: php4/pear/DB/ibase.php diff -u php4/pear/DB/ibase.php:1.7 php4/pear/DB/ibase.php:1.8 --- php4/pear/DB/ibase.php:1.7 Mon Sep 11 17:27:50 2000 +++ php4/pear/DB/ibase.php Wed Sep 13 04:27:59 2000 @@ -16,7 +16,7 @@ // | Authors: Sterling Hughes <sterling@php.net> | // +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.7 2000/09/12 00:27:50 ssb Exp $ +// $Id: ibase.php,v 1.8 2000/09/13 11:27:59 ssb Exp $ // // Database independent query interface definition for PHP's Interbase // extension. @@ -72,6 +72,7 @@ } function &query( $stmt ) { + $this->last_query = $query; $result = @ibase_query($this->connection, $stmt); if (!$result) { return $this->raiseError(); @@ -87,6 +88,7 @@ } function simpleQuery($stmt) { + $this->last_query = $query; $result = @ibase_query($this->connection, $stmt); if (!$result) { return $this->raiseError(); @@ -144,6 +146,7 @@ } function prepare($query) { + $this->last_query = $query; return ibase_prepare($query); } @@ -171,4 +174,12 @@ return $trans_args ? ibase_trans($trans_args, $this->connection) : ibase_trans(); } } + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + */ + ?> Index: php4/pear/DB/msql.php diff -u php4/pear/DB/msql.php:1.8 php4/pear/DB/msql.php:1.9 --- php4/pear/DB/msql.php:1.8 Mon Sep 11 17:27:50 2000 +++ php4/pear/DB/msql.php Wed Sep 13 04:27:59 2000 @@ -16,7 +16,7 @@ // | Authors: Sterling Hughes <sterling@php.net> | // +----------------------------------------------------------------------+ // -// $Id: msql.php,v 1.8 2000/09/12 00:27:50 ssb Exp $ +// $Id: msql.php,v 1.9 2000/09/13 11:27:59 ssb Exp $ // // Database independent query interface definition for PHP's Mini-SQL // extension. @@ -76,6 +76,7 @@ } function &query( $stmt ) { + $this->last_query = $stmt; $result = @msql_query($stmt, $this->connection); if (!$result) { return $this->raiseError(); @@ -91,6 +92,7 @@ } function simpleQuery($stmt) { + $this->last_query = $stmt; $result = @msql_query($stmt, $this->connection); if (!$result) { return $this->raiseError(); @@ -177,6 +179,7 @@ function execute($stmt, $data = false) { $realquery = $this->execute_emulate_query($stmt, $data); + $this->last_query = $realquery; $result = @msql_query($realquery, $this->connection); if (!$result) { return $this->raiseError(); Index: php4/pear/DB/mssql.php diff -u php4/pear/DB/mssql.php:1.11 php4/pear/DB/mssql.php:1.12 --- php4/pear/DB/mssql.php:1.11 Mon Sep 11 17:27:50 2000 +++ php4/pear/DB/mssql.php Wed Sep 13 04:27:59 2000 @@ -16,7 +16,7 @@ // | Authors: Sterling Hughes <sterling@php.net> | // +----------------------------------------------------------------------+ // -// $Id: mssql.php,v 1.11 2000/09/12 00:27:50 ssb Exp $ +// $Id: mssql.php,v 1.12 2000/09/13 11:27:59 ssb Exp $ // // Database independent query interface definition for PHP's Microsoft SQL Server // extension. @@ -76,6 +76,7 @@ } function &query( $stmt ) { + $this->last_query = $query; $result = @mssql_query($stmt, $this->connection); if (!$result) { return $this->raiseError(); @@ -91,6 +92,7 @@ } function simpleQuery($stmt) { + $this->last_query = $query; $result = @mssql_query($stmt, $this->connection); if (!$result) { return $this->raiseError(); @@ -177,6 +179,7 @@ function execute($stmt, $data = false) { $realquery = $this->execute_emulate_query($stmt, $data); + $this->last_query = $realquery; $result = @mssql_query($realquery, $this->connection); if (!$result) { return $this->raiseError(); Index: php4/pear/DB/mysql.php diff -u php4/pear/DB/mysql.php:1.25 php4/pear/DB/mysql.php:1.26 --- php4/pear/DB/mysql.php:1.25 Wed Sep 13 00:39:53 2000 +++ php4/pear/DB/mysql.php Wed Sep 13 04:27:59 2000 @@ -146,6 +146,7 @@ * on failure */ function &query($query) { + $this->last_query = $query; $result = @mysql_query($query, $this->connection); if (!$result) { return $this->raiseError($this->errorCode(mysql_errno($this->connection))); @@ -176,6 +177,7 @@ * returned on failure. */ function simpleQuery($query) { + $this->last_query = $query; $result = mysql_query($query, $this->connection); if (!$result) { return $this->raiseError($this->errorCode(mysql_errno($this->connection))); @@ -368,6 +370,7 @@ */ function execute($stmt, $data = false) { $realquery = $this->execute_emulate_query($stmt, $data); + $this->last_query = $realquery; $result = mysql_query($realquery, $this->connection); if (!$result) { return $this->raiseError($this->errorCode(mysql_errno($this->connection))); Index: php4/pear/DB/oci8.php diff -u php4/pear/DB/oci8.php:1.8 php4/pear/DB/oci8.php:1.9 --- php4/pear/DB/oci8.php:1.8 Mon Sep 11 17:27:50 2000 +++ php4/pear/DB/oci8.php Wed Sep 13 04:27:59 2000 @@ -121,6 +121,7 @@ * on failure */ function &query($query) { + $this->last_query = $query; $result = OCIParse($this->connection, $query); if (!$result) { return $this->raiseError(); @@ -159,6 +160,7 @@ * is returned on failure. */ function simpleQuery($query) { + $this->last_query = $query; $result = OCIParse($this->connection, $query); if (!$result) { return $this->raiseError(); @@ -327,6 +329,7 @@ $newquery.=$tokens[$i].":bind".$i; } $newquery.=$tokens[$i]; + $this->last_query = $query; $stmt=OCIParse($this->connection,$newquery); $this->prepare_types[$stmt] = $types; $this->select_query[$stmt] = preg_match('/(SELECT|SHOW)/i', $newquery); Index: php4/pear/DB/odbc.php diff -u php4/pear/DB/odbc.php:1.15 php4/pear/DB/odbc.php:1.16 --- php4/pear/DB/odbc.php:1.15 Mon Sep 11 17:27:50 2000 +++ php4/pear/DB/odbc.php Wed Sep 13 04:27:59 2000 @@ -155,6 +155,7 @@ // {{{ query() function query($query) { + $this->last_query = $query; $result = odbc_exec($this->connection, $query); if (!$result) { return $this->raiseError(); // XXX ERRORMSG @@ -183,6 +184,7 @@ * is returned on failure. */ function simpleQuery($query) { + $this->last_query = $query; $result = odbc_exec($this->connection, $query); if (!$result) { return $this->raiseError(); // XXX ERRORMSG Index: php4/pear/DB/pgsql.php diff -u php4/pear/DB/pgsql.php:1.12 php4/pear/DB/pgsql.php:1.13 --- php4/pear/DB/pgsql.php:1.12 Mon Sep 11 17:27:50 2000 +++ php4/pear/DB/pgsql.php Wed Sep 13 04:27:59 2000 @@ -148,6 +148,7 @@ * on failure */ function &query($query) { + $this->last_query = $query; $result = pg_exec($this->connection, $query); if (!$result) { return pg_errormessage($this->connection); @@ -178,6 +179,7 @@ * is returned on failure. */ function simpleQuery($query) { + $this->last_query = $query; $result = pg_exec($this->connection, $query); if (!$result) { return pg_errormessage($this->connection); @@ -380,6 +382,7 @@ */ function execute($stmt, $data = false) { $realquery = $this->execute_emulate_query($stmt, $data); + $this->last_query = $realquery; $result = pg_exec($this->connection, $realquery); if (!$result) { return pg_errormessage($this->connection); Index: php4/pear/DB/sybase.php diff -u php4/pear/DB/sybase.php:1.7 php4/pear/DB/sybase.php:1.8 --- php4/pear/DB/sybase.php:1.7 Mon Sep 11 17:27:50 2000 +++ php4/pear/DB/sybase.php Wed Sep 13 04:27:59 2000 @@ -16,7 +16,7 @@ // | Authors: Sterling Hughes <sterling@php.net> | // +----------------------------------------------------------------------+ // -// $Id: sybase.php,v 1.7 2000/09/12 00:27:50 ssb Exp $ +// $Id: sybase.php,v 1.8 2000/09/13 11:27:59 ssb Exp $ // // Database independent query interface definition for PHP's Sybase // extension. @@ -63,6 +63,7 @@ } function &query( $stmt ) { + $this->last_query = $stmt; $result = @sybase_query($stmt, $this->connection); if (!$result) { return $this->raiseError(); @@ -78,6 +79,7 @@ } function simpleQuery($stmt) { + $this->last_query = $stmt; $result = @sybase_query($stmt, $this->connection); if (!$result) { return $this->raiseError(); @@ -152,6 +154,7 @@ function execute($stmt, $data = false) { $realquery = $this->execute_emulate_query($stmt, $data); + $this->last_query = $realquery; $result = @sybase_query($realquery, $this->connection); if (!$result) { return $this->raiseError(); Index: php4/pear/DB/tests/db_error.phpt diff -u php4/pear/DB/tests/db_error.phpt:1.2 php4/pear/DB/tests/db_error.phpt:1.3 --- php4/pear/DB/tests/db_error.phpt:1.2 Wed Sep 13 00:39:53 2000 +++ php4/pear/DB/tests/db_error.phpt Wed Sep 13 04:27:59 2000 @@ -35,23 +35,23 @@ --POST-- --EXPECT-- testing different error codes... -[db_error: message="DB Error: unknown error" code=-1 mode=return level=notice prefix="" prepend="" append=""] -[db_error: message="DB Error: test error" code=0 mode=return level=notice prefix="" prepend="" append=""] -[db_error: message="DB Error: no error" code=0 mode=return level=notice prefix="" prepend="" append=""] -[db_error: message="DB Error: unknown error" code=-1 mode=return level=notice prefix="" prepend="" append=""] -[db_error: message="DB Error: syntax error" code=-2 mode=return level=notice prefix="" prepend="" append=""] -[db_error: message="DB Error: division by zero" code=-13 mode=return level=notice prefix="" prepend="" append=""] -[db_warning: message="DB Warning: unknown warning" code=-1000 mode=return level=notice prefix="" prepend="" append=""] -[db_warning: message="DB Warning: test warning" code=0 mode=return level=notice prefix="" prepend="" append=""] -[db_warning: message="DB Warning: read only" code=-1001 mode=return level=notice prefix="" prepend="" append=""] +[db_error: message="DB Error: unknown error" code=-1 mode=return level=notice prefix="" prepend="" append="" debug=""] +[db_error: message="DB Error: test error" code=0 mode=return level=notice prefix="" prepend="" append="" debug=""] +[db_error: message="DB Error: no error" code=0 mode=return level=notice prefix="" prepend="" append="" debug=""] +[db_error: message="DB Error: unknown error" code=-1 mode=return level=notice prefix="" prepend="" append="" debug=""] +[db_error: message="DB Error: syntax error" code=-2 mode=return level=notice prefix="" prepend="" append="" debug=""] +[db_error: message="DB Error: division by zero" code=-13 mode=return level=notice prefix="" prepend="" append="" debug=""] +[db_warning: message="DB Warning: unknown warning" code=-1000 mode=return level=notice prefix="" prepend="" append="" debug=""] +[db_warning: message="DB Warning: test warning" code=0 mode=return level=notice prefix="" prepend="" append="" debug=""] +[db_warning: message="DB Warning: read only" code=-1001 mode=return level=notice prefix="" prepend="" append="" debug=""] testing different error modes... -DB Error: unknown error[db_error: message="DB Error: unknown error" code=-1 mode=print level=notice prefix="" prepend="" append=""] +DB Error: unknown error[db_error: message="DB Error: unknown error" code=-1 mode=print level=notice prefix="" prepend="" append="" debug=""] <br> -<b>Notice</b>: DB Error: syntax error in <b>PEAR.php</b> on line <b>203</b><br> +<b>Notice</b>: DB Error: syntax error in <b>PEAR.php</b> on line <b>204</b><br> testing different error serverities... <br> -<b>Notice</b>: DB Error: syntax error in <b>PEAR.php</b> on line <b>203</b><br> +<b>Notice</b>: DB Error: syntax error in <b>PEAR.php</b> on line <b>204</b><br> <br> -<b>Warning</b>: DB Error: syntax error in <b>PEAR.php</b> on line <b>203</b><br> +<b>Warning</b>: DB Error: syntax error in <b>PEAR.php</b> on line <b>204</b><br> <br> -<b>Fatal error</b>: DB Error: syntax error in <b>PEAR.php</b> on line <b>203</b><br> +<b>Fatal error</b>: DB Error: syntax error in <b>PEAR.php</b> on line <b>204</b><br> Index: php4/pear/DB/tests/db_error2.phpt diff -u php4/pear/DB/tests/db_error2.phpt:1.2 php4/pear/DB/tests/db_error2.phpt:1.3 --- php4/pear/DB/tests/db_error2.phpt:1.2 Wed Sep 13 00:39:53 2000 +++ php4/pear/DB/tests/db_error2.phpt Wed Sep 13 04:27:59 2000 @@ -36,9 +36,9 @@ ?> --EXPECT-- -default: [db_error: message="DB Error: return testing error" code=0 mode=return level=notice prefix="" prepend="" append=""] +default: [db_error: message="DB Error: return testing error" code=0 mode=return level=notice prefix="" prepend="" append="" debug=""] mode=print: DB Error: print testing error mode=trigger: <br> -<b>Notice</b>: DB Error: trigger testing error in <b>PEAR.php</b> on line <b>203</b><br> -mode=function callback: myfunc here, obj=[db_error: message="DB Error: function callback testing error" code=0 mode=callback callback=myfunc prefix="" prepend="" append=""] -mode=object callback: myclass::myfunc here, obj=[db_error: message="DB Error: object callback testing error" code=0 mode=callback callback=myclass::myfunc prefix="" prepend="" append=""] +<b>Notice</b>: DB Error: trigger testing error in <b>PEAR.php</b> on line <b>204</b><br> +mode=function callback: myfunc here, obj=[db_error: message="DB Error: function callback testing error" code=0 mode=callback callback=myfunc prefix="" prepend="" append="" debug=""] +mode=object callback: myclass::myfunc here, obj=[db_error: message="DB Error: object callback testing error" code=0 mode=callback callback=myclass::myfunc prefix="" prepend="" append="" debug=""] Index: php4/pear/tests/pear_error.phpt diff -u php4/pear/tests/pear_error.phpt:1.2 php4/pear/tests/pear_error.phpt:1.3 --- php4/pear/tests/pear_error.phpt:1.2 Wed Sep 13 00:39:54 2000 +++ php4/pear/tests/pear_error.phpt Wed Sep 13 04:27:59 2000 @@ -79,26 +79,26 @@ --GET-- --POST-- --EXPECT-- -default PEAR_Error: [pear_error: message="unknown error" code=0 mode=return level=notice prefix="" prepend="" append=""] +default PEAR_Error: [pear_error: message="unknown error" code=0 mode=return level=notice prefix="" prepend="" append="" debug=""] Testing it: bool(true) This is not an error: bool(false) Now trying a bunch of variations... -different message: [pear_error: message="test error" code=0 mode=return level=notice prefix="" prepend="" append=""] -different message,code: [pear_error: message="test error" code=-42 mode=return level=notice prefix="" prepend="" append=""] -mode=print: test error[pear_error: message="test error" code=-42 mode=print level=notice prefix="" prepend="" append=""] -mode=callback(function): errorhandler function called, obj=[pear_error: message="test error" code=-42 mode=callback callback=errorhandler prefix="" prepend="" append=""] -mode=callback(method): errorhandler method called, obj=[pear_error: message="test error" code=-42 mode=callback callback=errorclass::errorhandler prefix="" prepend="" append=""] +different message: [pear_error: message="test error" code=0 mode=return level=notice prefix="" prepend="" append="" debug=""] +different message,code: [pear_error: message="test error" code=-42 mode=return level=notice prefix="" prepend="" append="" debug=""] +mode=print: test error[pear_error: message="test error" code=-42 mode=print level=notice prefix="" prepend="" append="" debug=""] +mode=callback(function): errorhandler function called, obj=[pear_error: message="test error" code=-42 mode=callback callback=errorhandler prefix="" prepend="" append="" debug=""] +mode=callback(method): errorhandler method called, obj=[pear_error: message="test error" code=-42 mode=callback callback=errorclass::errorhandler prefix="" prepend="" append="" debug=""] mode=print&trigger: test error<br> -<b>Notice</b>: test error in <b>PEAR.php</b> on line <b>203</b><br> -[pear_error: message="test error" code=-42 mode=print|trigger level=notice prefix="" prepend="" append=""] +<b>Notice</b>: test error in <b>PEAR.php</b> on line <b>204</b><br> +[pear_error: message="test error" code=-42 mode=print|trigger level=notice prefix="" prepend="" append="" debug=""] mode=trigger: <br> -<b>Notice</b>: test error in <b>PEAR.php</b> on line <b>203</b><br> -[pear_error: message="test error" code=-42 mode=trigger level=notice prefix="" prepend="" append=""] +<b>Notice</b>: test error in <b>PEAR.php</b> on line <b>204</b><br> +[pear_error: message="test error" code=-42 mode=trigger level=notice prefix="" prepend="" append="" debug=""] mode=trigger,level=notice: <br> -<b>Notice</b>: test error in <b>PEAR.php</b> on line <b>203</b><br> -[pear_error: message="test error" code=-42 mode=trigger level=notice prefix="" prepend="" append=""] +<b>Notice</b>: test error in <b>PEAR.php</b> on line <b>204</b><br> +[pear_error: message="test error" code=-42 mode=trigger level=notice prefix="" prepend="" append="" debug=""] mode=trigger,level=warning: <br> -<b>Warning</b>: test error in <b>PEAR.php</b> on line <b>203</b><br> -[pear_error: message="test error" code=-42 mode=trigger level=warning prefix="" prepend="" append=""] +<b>Warning</b>: test error in <b>PEAR.php</b> on line <b>204</b><br> +[pear_error: message="test error" code=-42 mode=trigger level=warning prefix="" prepend="" append="" debug=""] mode=trigger,level=error: <br> -<b>Fatal error</b>: test error in <b>PEAR.php</b> on line <b>203</b><br> +<b>Fatal error</b>: test error in <b>PEAR.php</b> on line <b>204</b><br>

« previous php.cvs (#1746) next »