Posted by Paul Czubilinski on 05/31/06 17:37
Hello,
I have code like this:
class MyException extends Exception {}
function x() {
try {
throw new MyException()
} catch (Exception $e) {
echo 'Exception catched';
exit;
}
try {
x();
} catch (MyException $e) {
echo 'MyException catched';
exit;
}
I cannot understand why this code catches Exception instead of
MyException? Can you please tell me what is wrong with it?
Best rgrds,
Paul
[Back to original message]
|