Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100907 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91964 invoked from network); 21 Oct 2017 07:20:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Oct 2017 07:20:05 -0000 Authentication-Results: pb1.pair.com header.from=tendoaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tendoaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.172 as permitted sender) X-PHP-List-Original-Sender: tendoaki@gmail.com X-Host-Fingerprint: 209.85.161.172 mail-yw0-f172.google.com Received: from [209.85.161.172] ([209.85.161.172:55662] helo=mail-yw0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 70/51-58908-325FAE95 for ; Sat, 21 Oct 2017 03:20:05 -0400 Received: by mail-yw0-f172.google.com with SMTP id t11so8174896ywg.12 for ; Sat, 21 Oct 2017 00:20:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=crecyERQSxueGcBMU7uW9nkNMwMdkfA7Vuj2OWIDPlU=; b=sXLPaaz+ZMWw/0Xf1UbSgLbR0E76ptkuzvFS7xlEoEh/wqicJX0QgusPpqHFDMkNpe M5F+kRUI7ekMBBkwucnuWu2oetvQZ7Ar/KXrfuT8wbLtPv0uSORDE26eogMi1UBQ2jOT QsV5fs7voezEiQLLP5x7NCfOaBjyCaI4G85EC5ykIbgd7Z7HUY09x8J1YITLvfpm9g4o JpZ6VI1Hgy/pKjmEJF55UDI0oXc1TQbMILcwuZnHIlXG3aaNTONqmf/piE5VZnlVPcmy GQAiXIMKbCjmDBObXau/nILcWWn3zrwL2eRQ3fa1dznVKRubgiz9uJr8mMTWSnzMTrNx dvCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=crecyERQSxueGcBMU7uW9nkNMwMdkfA7Vuj2OWIDPlU=; b=TcXqquOsNt2mCZux7IecvO/zUJ19sDhojEl9tJdcpgKBPxr7hrEkq4ilmwfowp1Be7 sgP7jgdnkflqDlw1icfIYQ1ICoL14Up3IUoDIizDfABnlIveeE8/xB7XHooEI4Kjz5ic 74+2o8bt282SAR0G01ws+lwN9aJNkxhqPpa7JHFeiqcCgPnzJoQ0YeYwoE3j+YTdXlsB lLpGChTrq5LKoXIkDaIeGQVV5QxyT99c4m7Pt8isDSbAAQwnMX4r9Ev0UlKC1Wn3CRJs hmDTYEoq0UKAL1VvKtCruTlGUbhso2nhkJEkP6v7OIWQlfGpflLmlkZ55pybDxvSzehB wVAw== X-Gm-Message-State: AMCzsaUP4D+7LXy9AC+W0qXx7UAQ79QpNKYr9a6LRoBQSYBJ0xojwzBV JPRGeLeSOrKUR5oH9daX+vom7fiDFxumgUlVXvE= X-Google-Smtp-Source: ABhQp+Rms/BCpyxh14J9z+uJGpB6bHbWXW1mzlWG8bJoMWkba8Tmj4AmGGTarMFwnikObaba9T5kUxNAvTRUOfYw158= X-Received: by 10.37.190.7 with SMTP id h7mr4589738ybk.10.1508570400548; Sat, 21 Oct 2017 00:20:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.139.141 with HTTP; Sat, 21 Oct 2017 00:20:00 -0700 (PDT) Date: Sat, 21 Oct 2017 03:20:00 -0400 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="089e08231ad4d7ec05055c096ab6" Subject: Wouldn't Exception::getContext() be useful? From: tendoaki@gmail.com (Michael Morris) --089e08231ad4d7ec05055c096ab6 Content-Type: text/plain; charset="UTF-8" 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. --089e08231ad4d7ec05055c096ab6--