Re: [PHP-PEAR] DB error reporting and DB/ifx.php

[email protected] (Chuck Hagenbuch) Tue, 27 Feb 2001 23:03:57 -0500
Newsgroups php.pear
Message-ID <[email protected]>
Quoting "Tomas V.V.Cox" <[email protected]>:

> // an especific database method
> function getNativeError (){
> 	return '<br><b>'.ifx_error().'</b> '.ifx_errormsg();
> }

This is a nit in the context of your message, but it's an important nit: don't 
put html in error messages. If you have to return a structured string, use xml 
so that users can transform it into whatever form they need. But I think we 
should try to have all PEAR error messages be unstructured strings or error 
codes, so that programmers using the APIs can do whatever they need to do with 
errors with a minimum of fuss.

-chuck

--
Charles Hagenbuch, <[email protected]>
"We have no fuel on board, plus or minus 8 kilograms." -A NASA scientist