Re: Bug #69640 Unhandled EngineExceptions thrown from userland do not produce any output

From: Date: Fri, 15 May 2015 17:41:43 +0000
Subject: Re: Bug #69640 Unhandled EngineExceptions thrown from userland do not produce any output
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-86236@lists.php.net to get a copy of this message
On 15 May 2015 at 17:12, Xinchen Hui <laruence@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

« previous php.internals (#86236) next »