Re: (re)throwing exceptions
| From: | Antony Dovgal | Date: | Sat, 06 Aug 2005 15:26:10 +0000 |
| Subject: | Re: (re)throwing exceptions | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-17562@lists.php.net to get a copy of this message | ||
On Sat, 06 Aug 2005 17:19:35 +0200
Dennis Sterzenbach <lists@darknoise.de> wrote:
> Hi Folks!
>
> What do you think about re-throwing an Exception?
> I think of a situation when writing a complex framework
> and one call on a lower hierachy level throws an Exception,
> the higher levels should be able to get to know.
> If I have to catch it on a higher level, I can't leave the
> caught Exception as is just adding my current context to the
> stack trace.
<?php
try {
/* do something here */
} catch (Exception $e) {
throw $e;
}
?>
Is it what you need?
--
Wbr,
Antony Dovgal