Re: [PHP] Emulating Java Exceptions

2002-07-12 Thread Alberto Serra
ðÒÉ×ÅÔ! Garland Foster wrote: > Alberto, > > I might have expressed the problem wrongly, if you have lets suposse you > have: > $obj = new foo(); > $obj->some(); > And some might return an "exception" object. > > The problem is that some may call a lot of other methods from foo and I > don't

Re: [PHP] Emulating Java Exceptions

2002-07-12 Thread Garland Foster
Alberto, I might have expressed the problem wrongly, if you have lets suposse you have: $obj = new foo(); $obj->some(); And some might return an "exception" object. The problem is that some may call a lot of other methods from foo and I don't want to check if the return value of each method ca

Re: [PHP] Emulating Java Exceptions

2002-07-12 Thread Alberto Serra
ðÒÉ×ÅÔ! Garland Foster wrote: > Hi All, > > I'm porting Java Code to PHP, my question is: What is the best approach > to emulate Java exceptions in PHP4? (I know ZE2 adds exceptions but I > can't wait). If the exceptions you have to manage are code generated at runtime you actually may simpl