On 15 May 2015 at 17:12, Xinchen Hui <larue...@gmail.com> wrote: >> How would that work when people want to write unit/integration tests >> to test the behaviour of a module when an EngineException is thrown? >> >> If you can't create a certain type of exception, it would mean that >> some code is basically untestable...which seems bad. > You can not creat it directly, but you can trigger the engine to throw one >
I don't think having to do something like: eval("<?php echo bar(};"); to test ParseExceptions is a good plan. Can you say what the actual problem is that would be solved by not allowing them to be initialized from userland? It seems an artificial limitation that just makes it harder to test programs. cheers Dan -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php