Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77816 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5178 invoked from network); 7 Oct 2014 18:00:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Oct 2014 18:00:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.75 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.75 smtp75.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.75] ([108.166.43.75:37488] helo=smtp75.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6F/7F-30869-83A24345 for ; Tue, 07 Oct 2014 14:00:24 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp26.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id 491E9380411; Tue, 7 Oct 2014 14:00:22 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp26.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id D723A3801E0; Tue, 7 Oct 2014 14:00:21 -0400 (EDT) X-Sender-Id: smalyshev@sugarcrm.com Received: from Stass-MacBook-Pro.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net [108.66.6.48]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA) by 0.0.0.0:465 (trex/5.2.13); Tue, 07 Oct 2014 18:00:22 GMT Message-ID: <54342A35.9040306@sugarcrm.com> Date: Tue, 07 Oct 2014 11:00:21 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Dmitry Stogov , Nikita Popov CC: PHP internals References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Exceptions in the engine From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > 1) I'm not sure if "cacth(Exception $e)" should catch engine and parser > exceptions. May be it's better to introduce interface or common parent > class "Catchable" and then make Exception, EngineException and > ParseException implement it. In case user would like to catch all the error > at once they will able to use "catch(Catchable $e)", but cacth(Exception > $e) would be 100% compatible. We had some requests for 'Throwable' class/interface for some time, e.g.: https://bugs.php.net/bug.php?id=48599 Maybe we could borrow something from Java here (http://docs.oracle.com/javase/6/docs/api/java/lang/Throwable.html) - not sure if it's the best way but it's an option. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/