object oriented php4

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
rajan
Forum Contributor
Posts: 110
Joined: Sun Aug 28, 2005 7:42 pm
Location: Lucknow, UP, India

object oriented php4

Post by rajan »

what will the best solution when there is some exception is generated in function of class?
foobar
Forum Regular
Posts: 613
Joined: Wed Sep 28, 2005 10:08 am

Re: object oriented php4

Post by foobar »

rajan wrote:what will the best solution when there is some exception is generated in function of class?
There is no exception handling in PHP4.

You have to know what the error will look like and intercept it with a control statement. Whatever you do after that is completely up to you. You could die() with a message, log a message with a logging function, instantiate an error class, you name it!

I don't really think there is a canonical "best" solution to it.
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Re: object oriented php4

Post by BDKR »

foobar wrote:I don't really think there is a canonical "best" solution to it.
Well put.
Post Reply