note 46227 added to language.oop5.exceptions
| From: | daschatulmaildotnet at osu1 dot php dot net | Date: | Sun, 03 Oct 2004 10:33:18 +0000 |
| Subject: | note 46227 added to language.oop5.exceptions | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-77786@lists.php.net to get a copy of this message | ||
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.
----
Manual Page -- http://www.php.net/manual/en/language.oop5.exceptions.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+46227
Delete -- http://master.php.net/manage/user-notes.php?action=delete+46227&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+46227&report=yes
Search -- http://master.php.net/manage/user-notes.php