Jump to content


Is tehre a way to get errors at sections


1 reply to this topic

#1 _*kcdclan_*

  • Guests

Posted 13 November 2005 - 12:57 PM

see code below
As most of you know with big projects you tend to get way ahead of your self and dont know where errors come from.then wind up seaching 1000+ lines of source for that little error like the ; after {echo"You have problems man"
Is tehre a way to make it sections.
like Show error like
echo "error in pig section
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in Location on line 369";

//Cow section
if($cow=="meat")
{echo "cow is meat";}
elseif
{echo"You have problems man";}

//pig
if($pig=="bacon")
{echo "pig is bacon";}
elseif
{echo"You have problems man"}


#2 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 13 November 2005 - 02:17 PM

Unless you do custom errors, then no. Even with custom errors that would be extreamly complicated. You can start looking at php.net for error_reporting and trigger_error if you want to try though.

And also, why would you want sections when the error gives you a line number (which in most cases is far more specific, note, i say most, not all)? Even if you use notepad for your PHP, it has a "goto line" feature...





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users