Привет!

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 simply write your own manager. Have a root class  with a 
method called

Function exception($yourparms) {
   treat exception here;
}

Game over, since everybody inherits from your root class you can manage 
whatever you want your own way. It's objects, so work in OO and forget 
about java lingo.

Mind you, it won't manage a parse error, that's for sure.

Пока
Альберто
Киев


@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@

LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
lOrD i'M sHiNiNg...
YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is
tHe TeSt, YeS iT iS
ThE tEsT, yEs It Is.......


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to