My First PHP Class
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: My First PHP Class
It is better not to just die, but generate an error page that helps the user resolve the problem.
(#10850)
Re: My First PHP Class
Using the die() command to handle errors is a very bad practice. It leaves no room for error handling
-
matthewcl375
- Forum Newbie
- Posts: 8
- Joined: Wed Jul 30, 2008 1:35 pm
Re: My First PHP Class
Oh i only recommended it as in the book that i learned PHP from it uses it a lot.
Thanks for the advice
Thanks for the advice
-
thinsoldier
- Forum Contributor
- Posts: 367
- Joined: Fri Jul 20, 2007 11:29 am
- Contact:
Re: My First PHP Class
What about throwing exceptions?pytrin wrote:Using the die() command to handle errors is a very bad practice. It leaves no room for error handling
Warning: I have no idea what I'm talking about.