note 80084 deleted from language.exceptions by felipe
| From: | felipe@php.net | Date: | Sun, 20 Apr 2008 16:50:35 +0000 |
| Subject: | note 80084 deleted from language.exceptions by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-138579@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
You can catch/throw the same exception multiple times if in need of nesting (without need of
creating tons of MyXExtension classes, just use as many try/catch pairs as needed:
<?php
try
{
try
{
// oops...
throw( new Exception() );
}
catch( Exception $e )
{
echo "we deal with his fault here...";
// and forward it
throw( new Exception() );
}
}
catch( Exception $e )
{
echo "Gotcha again";
}
?>
so if you just need to broadcast the exception till it reach your structure, you may try the above.