Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83277 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31397 invoked from network); 20 Feb 2015 08:46:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Feb 2015 08:46:54 -0000 Authentication-Results: pb1.pair.com header.from=pthreads@pthreads.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=pthreads@pthreads.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pthreads.org from 209.85.192.179 cause and error) X-PHP-List-Original-Sender: pthreads@pthreads.org X-Host-Fingerprint: 209.85.192.179 mail-pd0-f179.google.com Received: from [209.85.192.179] ([209.85.192.179:35245] helo=mail-pd0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CF/97-25547-D74F6E45 for ; Fri, 20 Feb 2015 03:46:53 -0500 Received: by pdbfl12 with SMTP id fl12so6242891pdb.2 for ; Fri, 20 Feb 2015 00:46:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=jV7o9j01jzDKUmStg3zEr6JdRrMItwESdDjZcKf5M6I=; b=DRpA2/fo1NBWzzgO4Bhj1EwUqD4wo8CBO5/QQke48BTWWcP/kFr6FJgRRPJqrqgCnS Cc358GtQSbhNFDQUZid0LFLASXvcx0hfikFimgndbSu66mvjhk1pE1e22RvKfBbEm+lb jXac0Dea3Xp5txdZI5+e2Ix04cX8UpWzxyOZX7uHlMVemZ+6MqMMNM0HzwKI9v6kvDEa i5uEwUIU0/qgQNdvXupZlgawZ8lv8Ulahuyj4GwFt2jYy2yxIf2hXX6PY7Z3JMSDHzzY ImfHPQGXhlRYZAHY19TIgn+vxJsTSh9U3xWdr49ekM+1iOTZ57EKhqdiZvPz88TSBm8u sLEA== X-Gm-Message-State: ALoCoQliIOe/sVl/JVcWIjN9WLJVSHuw2HU6I4fem+Hvhfz1NXviyhM2dpY1pf/AbkS/Wo/lwrmg MIME-Version: 1.0 X-Received: by 10.70.42.47 with SMTP id k15mr15188200pdl.134.1424422010699; Fri, 20 Feb 2015 00:46:50 -0800 (PST) Received: by 10.70.49.100 with HTTP; Fri, 20 Feb 2015 00:46:50 -0800 (PST) X-Originating-IP: [86.159.154.191] In-Reply-To: References: Date: Fri, 20 Feb 2015 08:46:50 +0000 Message-ID: To: Xinchen Hui Cc: PHP internals Content-Type: multipart/alternative; boundary=047d7bfe9e40f55cc1050f81178e Subject: Re: [PHP-DEV] [VOTE] Expectations From: pthreads@pthreads.org (Joe Watkins) --047d7bfe9e40f55cc1050f81178e Content-Type: text/plain; charset=UTF-8 Also, we don't optimize those away, it would not be sensible, because it's not sensible to deploy those catch blocks in the first place. Cheers Joe On Fri, Feb 20, 2015 at 8:38 AM, Joe Watkins wrote: > The custom exception must derive from AssertionException, so the same > optimization is possible. > > Cheers > Joe > > On Fri, Feb 20, 2015 at 8:28 AM, Xinchen Hui wrote: > >> Hey: >> >> >> >> On Thu, Feb 19, 2015 at 5:09 PM, Joe Watkins >> wrote: >> > Morning internals, >> > >> > The expectations RFC is now in voting phase: >> > https://wiki.php.net/rfc/expectations#vote >> >> sorry, the thread is too long to read.. I am not sure whether there >> was some similar opinion before.. >> >> I voted without custom exception, that is because. >> >> if all assertion exception is AssertException, then we can simply >> optimized them away while zend.assert is disabled.. >> >> like: >> >> try { >> foo(); >> bar(); >> assert(); >> } catch (AssertException $e) { >> //these statements can be optimized away. >> } >> >> but with custom exception.. >> >> try { >> >> sqllitefunc(); // no threw >> sqllitefunc1(); //no threw >> assert("", new SqlLiteException()); >> } catch (SqlliteException $e) { >> //we are not sure maybe sqllitefunc can throw SqliteException. >> // thus we can not optimized these statements ayway >> } >> >> thanks >> > >> > Cheers >> > Joe >> >> >> >> -- >> Xinchen Hui >> @Laruence >> http://www.laruence.com/ >> > > --047d7bfe9e40f55cc1050f81178e--