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

From: Date: Sat, 16 May 2015 18:47:52 +0000
Subject: Re: Bug #69640 Unhandled EngineExceptions thrown from userland do not produce any output
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-86255@lists.php.net to get a copy of this message
On 16 May 2015 at 17:00, Ryan Pallas <derokorian@gmail.com> wrote: > Why do you want to test parse exceptions? Lint your code before you run it > and you won't have any. ... maybe I'm missing something > obvious, Yeah, there's been a misunderstanding. I'm not talking about wanting to test whether my code generates parse exceptions, I'm talking about testing whether the code that catches parse exceptions behaves correctly. e.g. Wordpress should be catching ParseExceptions (and other EngineExceptions) generated by plugins and reporting those plugins as being problematic. The code that handles those exceptions needs to tested that it behaves correctly, which requires the appropriate exception being generated when the test is run. Although people could use a nasty hack such as eval("<?php echo bar(};");, that seems moderately horrific. cheers Dan

« previous php.internals (#86255) next »