ramblings on PHP, SQL, the web, politics, ultimate frisbee and what else is on in my life
back «  1  2 

Re: Play nice when extending \Exception

Although I agree that messing with the constructor parameters in the case of exceptions is a bad idea, but only because of practical reasons.

Especially I don't see how the "is a" relationship is violated. A constructor is not a normal method, it's just implemented in many languages as such (Java and PHP at least). But even then it is called once on creation and then never again, except under very special circumstances.

You can see the difference here: Constructor signature

«  1  2