Re: Assertions
| From: | Marco Schuster | Date: | Fri, 18 Oct 2013 00:45:02 +0000 |
| Subject: | Re: Assertions | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-69661@lists.php.net to get a copy of this message | ||
On Thu, Oct 17, 2013 at 11:42 PM, Rowan Collins <rowan.collins@gmail.com> wrote:
>
> The current implementation allows you to define a callback, and to choose
> whether assertions are fatal, which means that unit test frameworks and
> fancy-output wrappers can intercept assertions *without affecting other
> parts of the code*. The only way to do that with catch blocks would be to
> have an exception which didn't descend from Exception.
You could always throw a secondary exception from the catch-block.
Marco