Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100909 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11278 invoked from network); 21 Oct 2017 14:32:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Oct 2017 14:32:02 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.41 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.41 mail-wm0-f41.google.com Received: from [74.125.82.41] ([74.125.82.41:54635] helo=mail-wm0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D9/92-58908-16A5BE95 for ; Sat, 21 Oct 2017 10:32:02 -0400 Received: by mail-wm0-f41.google.com with SMTP id r68so2561055wmr.3 for ; Sat, 21 Oct 2017 07:32:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:user-agent:in-reply-to:references:mime-version :content-transfer-encoding:subject:to:from:message-id; bh=/CAFuo70cypw827L16Qk8gg9YZrrZYn3SKZYWfrfezQ=; b=oIfO75cSZwZbOdUnQM0K7EUykpD3itLV5AuKH7FMyjt5l8Vee7ZUVpYD8uLq2clD9H l6TQWYGcZYn3cuz2FN7MFyy/OZK/+LzjCrfVDaExsGm/5G3+ntGLv3svhfpJdBsGgFEn CKEXgUocYw3zaplojUUfdlbdmg6+zmVzhjkFs1EZuyZtpqLyn00o+QM+XpFwEiQAC/mF SPxPeODMayrU/ga5tvlI8hDGdOSQLcybRwcWQ/FW6MDpUh9hKQNdWBmHZsPv9wXd9yXc ysBgYIUkD/MJtJuiLq31vCXHWGyW6Rpd98xjvH7lfa+vkMct0LEsKX/C5OiLHADrc6pr 3eRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:user-agent:in-reply-to:references :mime-version:content-transfer-encoding:subject:to:from:message-id; bh=/CAFuo70cypw827L16Qk8gg9YZrrZYn3SKZYWfrfezQ=; b=b+tiWyA6Blahl6ivtLnV46wdGJQEB0ntPhaTi2aleyJQLsFnkirl6tOdP8Mkwa5qaQ BnPlm+0cZwHV+WNnIDt/sKooy/tjAoDIBQncn9U8GJ9BbV4vx+hAP/cWu7o+RbcRN0dh u2HTCtogssbDfMiqTKSkq3peH5mlq9UxldjVfdsbanWCJZTLKMLzI4MEf7e4yBuP9Mgw YdaOTCpGuT2W1e9kufDiK9e5m28eU2nM78ZyOg/6adwJTYtOezMMJbrV1mZCaIfj5HJ3 zbGs2yV16UDAAN3qEy+8r8SGIRzDvhlInB8+NLwbLwoLmRWNO3oXnbVti7PWdHL92w1V mf4g== X-Gm-Message-State: AMCzsaXkREoPiafRpJCu1PAvx6w7mmouX8XbGqWdS2VGI3lbWeUs8YZC dQsyBtYcWa2FlKyzF6JWkH6DtQ== X-Google-Smtp-Source: ABhQp+SfaM46givY9tOlBGeKsD8QUhZgJWTP/0QUT0G7+sTQ+QTkicaBMykrS6khCNKVu3bM15/4WA== X-Received: by 10.28.69.8 with SMTP id s8mr1303722wma.65.1508596318938; Sat, 21 Oct 2017 07:31:58 -0700 (PDT) Received: from ?IPv6:2a00:23c4:4b81:ae00:ec21:33ba:6ff:c80d? ([2a00:23c4:4b81:ae00:ec21:33ba:6ff:c80d]) by smtp.gmail.com with ESMTPSA id x75sm2232275wme.29.2017.10.21.07.31.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Oct 2017 07:31:57 -0700 (PDT) Date: Sat, 21 Oct 2017 15:31:53 +0100 User-Agent: K-9 Mail for Android In-Reply-To: <46d05c00-c34a-a907-2eeb-07d424db71c6@gmx.de> References: <46d05c00-c34a-a907-2eeb-07d424db71c6@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable To: PHP internals Message-ID: Subject: Re: [PHP-DEV] Re: Wouldn't Exception::getContext() be useful? From: rowan.collins@gmail.com (Rowan Collins) On 21 October 2017 11:41:46 BST, "Christoph M=2E Becker" wrote: >On 21=2E10=2E2017 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=2E=2E >>=20 >> throw new CustomException(get_definted_vars()); >>=20 >> It would be very useful to have exceptions just have this as a >method=2E >> set_error_handle had this ability, but it's now deprecated=2E 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=2E > >Quite likely the same reasoning as for deprecating the $errcontext >argument applies, see >=2E See also my posts about the problems of capturing arguments in the excepti= on's backtrace (sorry, don't have an archive link to hand)=2E Basically, ho= lding references to objects without user interaction makes object lifetimes= unpredictable and serialization unexpectedly fail=2E Did you just want this for debugging, or was there some other use case? Regards, --=20 Rowan Collins [IMSoP]