Re: when using die(), how can i get the line number that errored?

From: Date: Tue, 30 Jan 2001 08:50:16 +0000
Subject: Re: when using die(), how can i get the line number that errored?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-37268@lists.php.net to get a copy of this message
function errtrapper($file, $line){ echo "In $file on line $line<BR>\n"; #current body here. } die(errtrapper(__FILE__, __LINE__)); -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: "Noah Spitzer-Williams" <noahsw@cyberdude.com> Newsgroups: php.general Sent: Monday, January 29, 2001 6:59 PM Subject: [PHP] when using die(), how can i get the line number that errored? > here's my code: > > $res = mysql_query($badsqlstatement) or die(errtrapper()); > > inside errtrapper(), is there a way to find out what line this error > occurred? > > thanks!! > > - Noah > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#37268) next »