note 46227 deleted from language.oop5.exceptions by nlopess
| From: | nlopess@php.net | Date: | Fri, 31 Dec 2004 19:08:37 +0000 |
| Subject: | note 46227 deleted from language.oop5.exceptions by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-82514@lists.php.net to get a copy of this message | ||
Note Submitter: dasch at ulmail dot net
----
mkurth(at)futurekill.com: There's no need for such a feature, at least if all your exceptions
extends the Exception class:
<?php
class MyException extends Exception
{
// blabla...
}
try {
throw new MyException('foo!');
} catch (Exception $e) {
echo $e;
}
?>
The MyException will be caught by our catch statement, since it is of the type Exception.