Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100910 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20391 invoked from network); 21 Oct 2017 18:17:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Oct 2017 18:17:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=tendoaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tendoaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.174 as permitted sender) X-PHP-List-Original-Sender: tendoaki@gmail.com X-Host-Fingerprint: 209.85.161.174 mail-yw0-f174.google.com Received: from [209.85.161.174] ([209.85.161.174:46741] helo=mail-yw0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 37/53-58908-14F8BE95 for ; Sat, 21 Oct 2017 14:17:37 -0400 Received: by mail-yw0-f174.google.com with SMTP id t71so8911647ywc.3 for ; Sat, 21 Oct 2017 11:17:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=p3gcjXEceoJThM08IgB5lyn23c0We4CTRF2i7EC+j4o=; b=Hw0yiN2Ee6pwEbbtNuPpptF4oQfAxk9hs3BZxxzAJx+TUgqVgMGphmFgxf+JkOZc8y 0GfU5onQ5T7n7qWINfGjPD/4a1AQWrgCvs0dB/1ocyDgWaANoenCsK0/xPGTV0rqZUmW snuEVZoX2U0ROu3D7rIiJGjIOf+dQxTg9XQEWwBtbRjsYfOzqHKkKVHHRrp8pfUbX+mZ QokSMEnRS6LHLjbP2F8u+nexXNTrt1qiubFu/fKwOsfJSHP84ctaS27kzVOawcFoNkNK NwdKfT1nYUnqE7DGlU0xGH/h9WdkmSORXcDNxljWlXpkZSFYAzTyG3JdJmGg08dU9qSl KiWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=p3gcjXEceoJThM08IgB5lyn23c0We4CTRF2i7EC+j4o=; b=fC6zLdfT939Sko/ugAK6pCkBhtBjRd+9XnJ74QEtnrRxWBcyjoiWGu5Wa6G7j0tZ8t bupoM3otsfkkoqnx0TsbcN2gQNQ5SuaUSqUCpu+QfdALY70B1+d1JkBy5tkWXdv3wJTH 3L3aOJ4Gxp55cU+NxsbcCIlBVkNzRFarkRYClEyQuv3tRoxQXp3rUMMJqHFEwS1s8jAX UOuqdxCAKFAqmKQPf0lTqMsFx2RYxEQMa8r5PQHVB+ZEI1yjcZsMHwEISHHIOjyDAI61 MYfetws0A+U0cxoSGMGxH3hOShisXe79VDPs0ditp/vkKaswqtVvYfEkRdU6/2wjzqIo oB9A== X-Gm-Message-State: AMCzsaUvevIu/KoDIJqvuy+gdW/VmBhqfyZ1gGcWxOUg6wv3vvgQQTID fKwTmlDSMgyX0QGLxSFd/UMh3AFcQ6F5nFQayKo= X-Google-Smtp-Source: ABhQp+QD7DuXgB7Y6m7O4Dbjo/nAozmMB3LofDQUCw4Eo5oc0bA6i2qO30SVTRL1nGvkez8NaeTasOdEjf1bZbfUNZc= X-Received: by 10.129.163.88 with SMTP id a85mr5568944ywh.238.1508609854492; Sat, 21 Oct 2017 11:17:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.139.141 with HTTP; Sat, 21 Oct 2017 11:17:34 -0700 (PDT) In-Reply-To: References: <46d05c00-c34a-a907-2eeb-07d424db71c6@gmx.de> Date: Sat, 21 Oct 2017 14:17:34 -0400 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="94eb2c1285667b54d9055c129a25" Subject: Re: [PHP-DEV] Re: Wouldn't Exception::getContext() be useful? From: tendoaki@gmail.com (Michael Morris) --94eb2c1285667b54d9055c129a25 Content-Type: text/plain; charset="UTF-8" Just for debugging. I've been mulling over how to improve exception/error handling in Drupal 8 out of the box. On Sat, Oct 21, 2017 at 10:31 AM, Rowan Collins wrote: > On 21 October 2017 11:41:46 BST, "Christoph M. Becker" > wrote: > >On 21.10.2017 at 09:20, Michael Morris wrote: > > > >> Right now the only way I know of to see the context of an exception > >throw > >> is to pass it in.. > >> > >> throw new CustomException(get_definted_vars()); > >> > >> It would be very useful to have exceptions just have this as a > >method. > >> set_error_handle had this ability, but it's now deprecated. I'm > >guessing > >> there's an engine reason why this hasn't happened because it seems > >like a > >> pretty obvious include to the default methods of the Exception and > >Error > >> objects. > > > >Quite likely the same reasoning as for deprecating the $errcontext > >argument applies, see > > errcontext_argument_of_error_handler>. > > > See also my posts about the problems of capturing arguments in the > exception's backtrace (sorry, don't have an archive link to hand). > Basically, holding references to objects without user interaction makes > object lifetimes unpredictable and serialization unexpectedly fail. > > Did you just want this for debugging, or was there some other use case? > > Regards, > > -- > Rowan Collins > [IMSoP] > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --94eb2c1285667b54d9055c129a25--