Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69640 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96532 invoked from network); 17 Oct 2013 16:12:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Oct 2013 16:12:04 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.173 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.214.173 mail-ob0-f173.google.com Received: from [209.85.214.173] ([209.85.214.173:40359] helo=mail-ob0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 84/C1-12663-35C00625 for ; Thu, 17 Oct 2013 12:12:04 -0400 Received: by mail-ob0-f173.google.com with SMTP id vb8so2058151obc.4 for ; Thu, 17 Oct 2013 09:12:01 -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=U/onfBy/7ZJO4LN+3MJjYSYiTuR/72z4hBFUjEs2H4Q=; b=jTg1La97g1AFYLq8QPpQXem7+HvKt2qUw0Gm2zyIsRt9ftlNL3IsBUThHf1Q4sBlUM PwZ+osdZp+kuT15G+n3jbz35IQ2yGRFqfWcKIoFLHpzeElzWhvCBcYL12sbwiXF/CGzF SzoDuLd30otWmUmFE0O//xCeLT8YdNWUWC4JY0Jz9PocYkdLCZRzjqVEZlyq854ceB7n bBDr2HtuXAQeCL1FY3k48hoaERHDASjhcJfqjdzsQDDdYW6JdzRB1D6TMMwiJnRBKjsb lV2K3uwWT8NM4QT+GA1a/JCTwwwhwXpCeKmG3c9R0tIEMHmpABdHQ7470Qw82O0TC0J2 /T1g== MIME-Version: 1.0 X-Received: by 10.182.166.40 with SMTP id zd8mr14732847obb.25.1382026321203; Thu, 17 Oct 2013 09:12:01 -0700 (PDT) Received: by 10.182.54.112 with HTTP; Thu, 17 Oct 2013 09:12:01 -0700 (PDT) In-Reply-To: References: <525FC834.4060501@php.net> <1534105.bNC2os93J1@rofl> <525FDAC3.6060103@php.net> Date: Thu, 17 Oct 2013 18:12:01 +0200 Message-ID: To: J David Cc: Joe Watkins , PHP internals , Michael Wallner Content-Type: multipart/alternative; boundary=e89a8ff1ce02f2184804e8f21362 Subject: Re: [PHP-DEV] Assertions From: nikita.ppv@gmail.com (Nikita Popov) --e89a8ff1ce02f2184804e8f21362 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Oct 17, 2013 at 6:06 PM, J David wrote: > > PHPUnit will catch the exception and tell you that an assertion failed, > but it will still be able to continue running the rest of the testsuite. > > A framework (or front controller in general) can easily catch the > exception at the top level and display an appropriate debugging page > (rather than doing ugly register_shutdown_function hacks that are necessary > to have even remotely graceful handling of fatals). > > A deamon or server will be able to process further requests, even if one > particular had an assertion failure. > > Those are three great examples of how assertions are frequently misused. > I would greatly appreciate a more detailed explanation as to how these examples abuse assertions. In particular the first two seem very reasonable to me, but I'm open to being convinced otherwise. Nikita --e89a8ff1ce02f2184804e8f21362--