Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69777 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58468 invoked from network); 22 Oct 2013 18:47:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Oct 2013 18:47:22 -0000 Authentication-Results: pb1.pair.com header.from=bof@bof.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=bof@bof.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain bof.de designates 80.242.145.70 as permitted sender) X-PHP-List-Original-Sender: bof@bof.de X-Host-Fingerprint: 80.242.145.70 mars.intermailgate.com Received: from [80.242.145.70] ([80.242.145.70:39745] helo=mars.intermailgate.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E7/BA-10840-938C6625 for ; Tue, 22 Oct 2013 14:47:21 -0400 Received: (qmail 28095 invoked by uid 1009); 22 Oct 2013 20:47:17 +0200 Received: from 209.85.128.169 by mars (envelope-from , uid 89) with qmail-scanner-1.25-st-qms (clamdscan: 0.96.2/17988. spamassassin: 3.3.1. perlscan: 1.25-st-qms. Clear:RC:1(209.85.128.169):. Processed in 0.067348 secs); 22 Oct 2013 18:47:17 -0000 X-Antivirus-MYDOMAIN-Mail-From: bof@bof.de via mars X-Antivirus-MYDOMAIN: 1.25-st-qms (Clear:RC:1(209.85.128.169):. Processed in 0.067348 secs Process 28081) Received: from mail-ve0-f169.google.com (gmail@bof.de@209.85.128.169) by mars.intermailgate.com with RC4-SHA encrypted SMTP; 22 Oct 2013 20:47:17 +0200 Received: by mail-ve0-f169.google.com with SMTP id oy12so5666481veb.0 for ; Tue, 22 Oct 2013 11:47:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=bfix/HuQXy6VcyTui280xvZq/cLnU1XaFthFlHPBOJg=; b=eprqCFA9I6V+VCbmkVnfVill6H6Mo8gXPC3lOSa30Bq58NNrpnVE83bZUcQlqiDS8F RD7DrrORBxBwJtAUvm7SriVV7zQxCNTP1EPcRYEowdlL+4W6pXTSXlPE5Zeb1ZE7XmYn F9+kRD4U73MyqaGhXl8PbvTqnb+EeSbXYRFMX2sOFMScMk9W2R9k0oD4WLV1UJAu7kO4 D64uDIYivM0Tb2XBKm+BPQJ3SZ6WD0tzTuVgbnmP64XVNoFV+7z2vNHMqqPnYH5Wc7vh A3A/Jj/4kxJA3y6pQ0EN3Z51m0C01pRkmrpyS4PtrbEK873TazPNFoLOKVKX8cVutKzN fvvg== MIME-Version: 1.0 X-Received: by 10.58.208.130 with SMTP id me2mr15417312vec.13.1382467636028; Tue, 22 Oct 2013 11:47:16 -0700 (PDT) Received: by 10.52.185.102 with HTTP; Tue, 22 Oct 2013 11:47:15 -0700 (PDT) Received: by 10.52.185.102 with HTTP; Tue, 22 Oct 2013 11:47:15 -0700 (PDT) In-Reply-To: References: <3D.BC.23638.84CA1625@pb1.pair.com> <5264FE65.8050808@php.net> <5266B6A8.4010607@pthreads.org> <5266BECD.8000204@php.net> Date: Tue, 22 Oct 2013 20:47:15 +0200 Message-ID: To: Nikita Popov Cc: internals , Adam Harvey , Joe Watkins Content-Type: multipart/alternative; boundary=047d7bdc192c5bef5604e958d49c Subject: Re: [PHP-DEV] RFC: Expectations From: bof@bof.de (Patrick Schaaf) --047d7bdc192c5bef5604e958d49c Content-Type: text/plain; charset=ISO-8859-1 Am 22.10.2013 20:41 schrieb "Nikita Popov" : > > If you want to handle uncaught exceptions via auto_prepend_file you can use set_exception_handler(). It will register a global handler that is invoked on an uncaught exception. Fair enough, thanks. > Generally anything that uses a global handler (e.g. for assertion failures...) turns out to be a PITA when you try to combine multiple libraries which want different handlers. In the end you can't really use any such handlers in a portable library. I'd like assertions to be usable in libraries. How do you envision that to work in practise with the exception approach? Make every externally visible function and method in the library contain a suitable try/catch block? best regards Patrick --047d7bdc192c5bef5604e958d49c--