Re: best way to throw erorrs within a class

From: Date: Thu, 27 Mar 2003 09:05:12 +0000
Subject: Re: best way to throw erorrs within a class
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-141235@lists.php.net to get a copy of this message
Dan Rossi wrote: > hi guys i have been trying to work out the best way to trigger exception > style error handling within a class and return it ,i am currently storing > the error code into a session variable, exiting, and doing a header location > to the previous page where i was submitting from and output the error code > with the message in an array is this the best way to do this , or is trigger > error with a set_error_handler on a function within the lass the best way to > do it ? Seems as if you complicate things, sounds like it could bring you to messy code if some things is completed and some things not. Maybe it's better to keep error checking in the same script, and show error message or possibly redirect if there is nothing wrong? Keep It Simple Stupid.

« previous php.general (#141235) next »