Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51531 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11873 invoked from network); 24 Feb 2011 09:29:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Feb 2011 09:29:50 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.213.170 mail-yx0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:50255] helo=mail-yx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 47/F5-55836-C05266D4 for ; Thu, 24 Feb 2011 04:29:48 -0500 Received: by yxi11 with SMTP id 11so199824yxi.29 for ; Thu, 24 Feb 2011 01:29:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:date:x-google-sender-auth :message-id:subject:from:to:content-type; bh=kLGO4AFSJDVHHs2G6lOcW2fEtFlPa4dGswQJTtDrZVU=; b=vciFD6zVzYFFyA6nTJqHaZ1xEqgZHVdv8xu1iqSf3wnbkXrNs0tFAc7TRbb/6C0kRZ hff74ydR8TSoLIuAaLLzVAHbZFrqg729TPzb4so296NDnr9sUz1X59EEOkeKuYWzvcu1 nfEReCmKMtu6RFxtWDz5kBbV2EArF3eOTOscg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=DwQ6wHDfYrZPkKSCCfVkrnujeuyVu+JQwXtVRtmIyqNRiSTs9MT4/HyV9om++fnWYQ RROVy3S0KP1Ckxrgvm4AvajgZtUXqt4j4lPy1rZkuf54jM0Vqo2VesoxsQVdAfxcdx8F za3H+JSodfiBoh+y/H9Pphb1afcscBBK3T4gQ= MIME-Version: 1.0 Received: by 10.91.64.2 with SMTP id r2mr1616033agk.133.1298539785819; Thu, 24 Feb 2011 01:29:45 -0800 (PST) Sender: tyra3l@gmail.com Received: by 10.91.95.14 with HTTP; Thu, 24 Feb 2011 01:29:45 -0800 (PST) Date: Thu, 24 Feb 2011 10:29:45 +0100 X-Google-Sender-Auth: Zm--ugD3R78dQKtj7KFLwi9Oki4 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary=001485f6ca5ca9152c049d03da43 Subject: Are exceptions allowed in php core? From: info@tyrael.hu (Ferenc Kovacs) --001485f6ca5ca9152c049d03da43 Content-Type: text/plain; charset=UTF-8 Hi. it was mentioned multiple times on the list, that exceptions from php core is prohibited. do we have some documentation about this? the more detailed email on this topic was from Lukas: http://www.mail-archive.com/internals@lists.php.net/msg43237.html "Generally we have decided to leave Exceptions out of core with a few "exceptions": 1) errors in the constructor will throw an exception 2) extensions may choose to offer an Exception mode (see PDO) I never understood why we did 1), if a constructor can fail, then a factory should be used instead. But oh well. With 2) you are obviously also opening a pandoras box, that is similar to using a global error handler that turns all Notices, Warnings etc as Exception: you can easily break code that calls various libraries .. take for example passing in a PDO instance to one library which expects the normal error mode and another one that enables the Exception mode. For the most part however we can conclude that most libraries enable the Exception mode in PDO and I think you will be hard pressed to find any PDO code example that doesn't assume that the Exception mode is enabled. " every other mention about this topic is in-general prohibits the usage of exceptions. http://www.mail-archive.com/internals@lists.php.net/msg49637.html http://www.mail-archive.com/internals@lists.php.net/msg44159.html so I would like to know, that what is the current situation, and do these mails still holds true. maybe things has changed. Tyrael --001485f6ca5ca9152c049d03da43--