Elegant error reporting, possible?

From: steve (UseLinkToEmail_at_dbForumz.com)
Date: 03/14/05


Date: 13 Mar 2005 21:10:50 -0500

Hi,
In my script (phpnuke), whenever there is access to database, there is
this line of code:

  message_die(GENERAL_ERROR, ’some error msg’, ’’, __LINE__, __FILE__,
$sql);

Is there a more elegant way of reporting line number besides putting
this line everywhere I access db. I want to just write a function,
which also globally knows about the current line number(?) and in case
of error reports it.

Is there any way to do that?

-- 
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/PHP-Elegant-error-reporting-ftopict206147.html
Visit Topic URL to contact author (reg. req'd).  Report abuse: http://www.dbforumz.com/eform.php?p=703259


Relevant Pages

  • Elegant error reporting, possible?
    ... Is there a more elegant way of reporting line number besides putting ... Visit Topic URL to contact author (reg. ...
    (alt.php)
  • Re: Re: $_REQUEST problem
    ... > My approach to this is: always use isset() on any variable you ... Tight error reporting ensures that you ... explicit copying of var data ... Visit Topic URL to contact author (reg. ...
    (comp.lang.php)
  • Re: Re: $_REQUEST problem
    ... > My approach to this is: always use isset() on any variable you ... Tight error reporting ensures that you ... explicit copying of var data ... Visit Topic URL to contact author (reg. ...
    (comp.lang.php)
  • Re: Re: $_REQUEST problem
    ... > My approach to this is: always use isset() on any variable you ... Tight error reporting ensures that you ... explicit copying of var data ... Visit Topic URL to contact author (reg. ...
    (comp.lang.php)
  • Re: Re: Is it ok to use error_reporting(0) to get rid of error m
    ... "undefined" warning from php. ... the warning reporting off. ... Visit Topic URL to contact author (reg. ...
    (comp.lang.php)