Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86249 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36001 invoked from network); 16 May 2015 17:00:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 May 2015 17:00:44 -0000 Authentication-Results: pb1.pair.com header.from=derokorian@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=derokorian@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.51 as permitted sender) X-PHP-List-Original-Sender: derokorian@gmail.com X-Host-Fingerprint: 74.125.82.51 mail-wg0-f51.google.com Received: from [74.125.82.51] ([74.125.82.51:33056] helo=mail-wg0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7A/E5-14891-8B777555 for ; Sat, 16 May 2015 13:00:41 -0400 Received: by wgin8 with SMTP id n8so146258851wgi.0 for ; Sat, 16 May 2015 10:00:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=J/zzN97ZKQAKpsROWd9HOg4P7O2USVtuTUk+asUfMiM=; b=UuOEKXDS2yd6c1fLi6iEDnmSVwXY1hov3WMrIRvx81UZKaD3g0DG/rsnD0pmy2Rz+j jFnWWAXoOkjRzFmuXl2zQXrN9SipeRl9yMiqiy5PtUALoca29h+ZjTCURH4w64t+RpP2 JBFT5AFlfWuw+uSqEiA953fyckZhXKxnPVWTZtvP7WR2e9yRqYY9lgmvbww2df7YNK5p dSat0xw6GBVF9zzzMfA8iKMI/00JEkg7X4DbYUoaawWnu8mlUnbO6H+HdjhXxXr5Yz0c 9FqAEfOOKcY1zUgohy0gTW1w0nSUyez9AjFL1tFETzJurwbG0+8MgFI03BsOUBDSuMFC M3QQ== MIME-Version: 1.0 X-Received: by 10.180.107.38 with SMTP id gz6mr7269924wib.63.1431795637916; Sat, 16 May 2015 10:00:37 -0700 (PDT) Received: by 10.28.7.196 with HTTP; Sat, 16 May 2015 10:00:37 -0700 (PDT) In-Reply-To: References: Date: Sat, 16 May 2015 11:00:37 -0600 Message-ID: To: Dan Ackroyd Cc: Xinchen Hui , PHP Internals Content-Type: multipart/alternative; boundary=e89a8f2356ad6397ff051635e6e1 Subject: Re: [PHP-DEV] Bug #69640 Unhandled EngineExceptions thrown from userland do not produce any output From: derokorian@gmail.com (Ryan Pallas) --e89a8f2356ad6397ff051635e6e1 Content-Type: text/plain; charset=UTF-8 On Fri, May 15, 2015 at 11:41 AM, Dan Ackroyd wrote: > On 15 May 2015 at 17:12, Xinchen Hui 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(" > 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. > > Why do you want to test parse exceptions? Lint your code before you run it and you won't have any. Additionally, your code doesn't run until after parsing is finished, so its not something that it makes sense to "test" since your code won't ever execute then... maybe I'm missing something obvious, but I've never wanted to test the parser, just my code written for it. > cheers > Dan > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --e89a8f2356ad6397ff051635e6e1--