Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86247 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23606 invoked from network); 16 May 2015 15:06:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 May 2015 15:06:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=laruence@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=laruence@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.47 as permitted sender) X-PHP-List-Original-Sender: laruence@gmail.com X-Host-Fingerprint: 209.85.215.47 mail-la0-f47.google.com Received: from [209.85.215.47] ([209.85.215.47:36597] helo=mail-la0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C8/04-14891-20D57555 for ; Sat, 16 May 2015 11:06:42 -0400 Received: by lagv1 with SMTP id v1so162330352lag.3 for ; Sat, 16 May 2015 08:06:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=fimp/zcNsvyzbejBnat7Lvs5v6dd++YpzyHE2f7PxN4=; b=O25rBDMzO0Hy87vVMBIP2xRdkCb1tQgkw7/MY/gqjVYm6pOzpfejGY5AlQaOa/FDQ6 6fXkTM1UCAcTDCoCqISHAqPZanJXoHFCGcQmYuHCgorFRXmzMjxsrPLxp9rCV/hJ4yAq uhRgPtRbo639mnpjlMBuf66Lz9Cmdto1yrelc7lUOdNh6zcwUTveD9oTUzGBx4DsG4+T NLvEJ5lmTtZ2NoB9eQjBo4pBgbNPH5AptI8yGXzUKcP3DKlgvQOpRDuQMXLH0TNNYhFv KiWDhY5IELhyDWrJMUAQxtYXS88gPlE6//yOaCSuvZj2dL2FCoKXjtRgtaqz/Imd/har 1eDA== X-Received: by 10.152.20.234 with SMTP id q10mr3927420lae.45.1431788799294; Sat, 16 May 2015 08:06:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.114.180.4 with HTTP; Sat, 16 May 2015 08:06:18 -0700 (PDT) In-Reply-To: References: Date: Sat, 16 May 2015 23:06:18 +0800 Message-ID: To: Dan Ackroyd Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Bug #69640 Unhandled EngineExceptions thrown from userland do not produce any output From: laruence@gmail.com (Xinchen Hui) Hey: On Sat, May 16, 2015 at 1: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. EngineException/TypeException/ParserException is designed for internal errors only. if then are used in user land. they may cause lots of side affects, this bug is one of them... thanks > > cheers > Dan -- Xinchen Hui @Laruence http://www.laruence.com/