Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86192 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36274 invoked from network); 13 May 2015 12:52:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 May 2015 12:52:37 -0000 Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.51 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 74.125.82.51 mail-wg0-f51.google.com Received: from [74.125.82.51] ([74.125.82.51:35254] helo=mail-wg0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E5/70-31288-31943555 for ; Wed, 13 May 2015 08:52:36 -0400 Received: by wgnd10 with SMTP id d10so40080278wgn.2 for ; Wed, 13 May 2015 05:52:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=tt/m4IWM7z0cxMkyPQHqoJCXG4p0itB8w+/cvaJTEgE=; b=BVfu8S3NxiB3WPL85Vf3dS8nh1xZ6VSuyXn/4LEO6lTHIjiD6580sfAOqaae3MROad FMaUZ4ZojPjVZEoDAQTGYgdJT2dG/dey/4PTZbcIb44weDQHMlUan3FpLiAm6YtH5gtE MPvT/TRs5R+oJ4vXdT4l8RfvaU/3jW3Y5XPpQ0ZhFm4q/24V+Vy56EeKV9Iw1GcqAryY uwRO62Vixsqlzxmv/u7WOLpXNrh52Hp151j5gfGHSlF96mMRPlfBDWLRQVwe4v7x5rBE drUK4rqGDLzXBqG/uAVDZS1Deln3Aqe3zKPdTe8aCLOd5XVsFa0SXy9V2CKpHQhZJnw4 oKbg== X-Received: by 10.194.103.232 with SMTP id fz8mr38005224wjb.130.1431521552878; Wed, 13 May 2015 05:52:32 -0700 (PDT) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.194.174.131 with HTTP; Wed, 13 May 2015 05:51:52 -0700 (PDT) In-Reply-To: <5552FF58.8070807@php.net> References: <54F07FC7.8050901@php.net> <54F0839C.3010700@seld.be> <55052FAD.6090608@php.net> <5505346D.7020700@php.net> <550DA4EE.2030903@php.net> <55410973.4010300@php.net> <55417C64.7000707@gmail.com> <5541B4D6.9060503@php.net> <55425D7E.6010803@gmail.com> <554D8F4D.9020903@gmail.com> <554D90CC.3040607@php.net> <5552E3EB.5010800@gmail.com> <5552E494.5070401@php.net> <5552FF58.8070807@php.net> Date: Wed, 13 May 2015 14:51:52 +0200 X-Google-Sender-Auth: oYVmPUbTgGM_bTe246wbY3Pq-1E Message-ID: To: Sebastian Bergmann Cc: PHP Internals Content-Type: multipart/alternative; boundary=047d7bf109f0a5d1510515f615c7 Subject: Re: [PHP-DEV] [VOTE] Exceptions in the engine From: jpauli@php.net (Julien Pauli) --047d7bf109f0a5d1510515f615c7 Content-Type: text/plain; charset=UTF-8 On Wed, May 13, 2015 at 9:38 AM, Sebastian Bergmann wrote: > Am 13.05.2015 um 08:30 schrieb Pierre Joye: > > Why don't you do it? You have access and you are a very good writer. > > No big C knowledge required either in this case :) > > There was/is consensus on what I proposed back in February: > > * Introduce a Throwable interface > * Let Exception implement the Throwable interface > * Introduce an Error class that implements the Throwable interface > * Use Error class as base class for exceptions raised by the engine > > But as simple as the above sounds it is complicated (at least for > me) to implement (properly). Here's what I was able to come up with: > > https://github.com/php/php-src/pull/1274 > > This should give us the following: > > interface Throwable {} > abstract class BaseException implements Throwable {} > class Exception extends BaseException {} > class Error extends BaseException {} > class EngineError extends Error {} > class ParseError extends Error {} > class TypeError extends Error {} > > I am not sure whether we still want the abstract BaseException > class. I left it in because I couldn't figure out how to remove > it without breaking Exception and Error. > > Added my comments inline on the PR :-) Julien --047d7bf109f0a5d1510515f615c7--