csnyder wrote:
... then try/catch is the way out of your nightmare.try { $obj->process1(); $obj->process2(); $obj->process3(); } catch Exception( e ) { exit( "An error occurred: ".$e->message() ); } Error handling doesn't need to be part of your program logic anymore.
Note that process1 etc must throw an exception internally in order for the catch to work, as explained once again at http://us2.php.net/manual/en/language.exceptions.php
-- ================= Michael Southwell Vice President, Education NYPHP TRAINING: http://nyphp.com/Training/Indepth _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php
