Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83208 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60828 invoked from network); 19 Feb 2015 15:31:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Feb 2015 15:31:36 -0000 Authentication-Results: pb1.pair.com header.from=danack@basereality.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=danack@basereality.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain basereality.com from 209.85.213.51 cause and error) X-PHP-List-Original-Sender: danack@basereality.com X-Host-Fingerprint: 209.85.213.51 mail-yh0-f51.google.com Received: from [209.85.213.51] ([209.85.213.51:46690] helo=mail-yh0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CF/7E-18870-6D106E45 for ; Thu, 19 Feb 2015 10:31:35 -0500 Received: by yhzz6 with SMTP id z6so395175yhz.13 for ; Thu, 19 Feb 2015 07:31:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=GZwcAiUQSkLlCRDhMWvc8zQmMNRqXnfSJ/RL58dOaOc=; b=Go1Z25NwnV7Tpj6j72uXmT/3c9yE8rFYRTlsLPsTJ0BA/aQFrWfFOGMHpnlriJkiBw wBQnEwpbJOluDqezm7WQye0Dj7p4H0bVKtg77qYlvwMh1S9FTjrDTxcspp9bZ8xPm1z8 lcjHyF4d/MBbycWOvkkFg04F7eFDk9RZzO9oViZq/OXBMVtRtXjtxW/xw0ncKOwCTK1N o1mgWvlXT7NGIYGVxRYyLRnv76+sR8L7+1PNn4/0M4bNNiFh5M4Xzr5lJOQ/KvF39/2P Ljdz2F3Vln2rRqZRJdAgYX/D7v+XZ0j0TfDEjLG+Fe6ZmFlCtv3HkC6RbyhjiXjNUBTi e7LQ== X-Gm-Message-State: ALoCoQm2UZR0bBYEHt9TS5nuRfqOJImpCsuMKWOX0A0n7muyzTeboyiKPpVOitva8YtzN6jyIwRn MIME-Version: 1.0 X-Received: by 10.236.1.38 with SMTP id 26mr3168697yhc.163.1424359891092; Thu, 19 Feb 2015 07:31:31 -0800 (PST) Received: by 10.170.71.86 with HTTP; Thu, 19 Feb 2015 07:31:30 -0800 (PST) X-Originating-IP: [89.240.52.213] In-Reply-To: References: Date: Thu, 19 Feb 2015 15:31:30 +0000 Message-ID: To: Dmitry Stogov Cc: Nikita Popov , PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Re: [RFC] Exceptions in the engine From: danack@basereality.com (Dan Ackroyd) On 19 February 2015 at 09:54, Dmitry Stogov wrote: > I think we may introduce the following hierarchy > the existing code that caught Exception is going to be unaffected. We could do that. But it's not obviously correct, and ought to be justified as to why it would be the correct thing to do. The problem of people needing to catch every type of exception could also be solved by using a common interface. class EngineException implements ExceptionInterface {} class Exception implements ExceptionInterface {} try { foo(); } catch(ExceptionInterface $exception) { //catches everything. } This avoids a requirement for all exceptions to extend from a common base class. The interface for exceptions would be the current Exception classes methods, excluding the constructor. > We thought about "Throwable" or "Catchable" interface, but this change > would require more changes and will make more BC breaks. Please can you explain what those problems are? cheers Dan