AssertionExceptions are not intended to be caught, they are intended to be seen, in a specific environment.

Joe, your argumentation is around how (not) to use exceptions. I can see your point and it's valid.
My point is about not to implement exceptions at all.

If exceptions are not intended to be caught, they don't need to be thrown (even if the context is different). If exceptions are not thrown and not caught, we can use "error" in dev and some easing severity (warning, zero cost nothing) in prod.

Freely adapted from Murphy: If assertion exception can be catched, it will be even in production.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to