Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9177 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48799 invoked by uid 1010); 15 Apr 2004 11:59:49 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 48766 invoked from network); 15 Apr 2004 11:59:49 -0000 Received: from unknown (HELO sapo.pt) (212.55.154.26) by pb1.pair.com with SMTP; 15 Apr 2004 11:59:49 -0000 Received: (qmail 28687 invoked from network); 15 Apr 2004 11:59:48 -0000 Received: from unknown (HELO sapo.pt) (10.134.35.153) by relay6 with SMTP; 15 Apr 2004 11:59:48 -0000 Received: (qmail 24285 invoked from network); 15 Apr 2004 11:57:01 -0000 Received: from unknown (HELO pc07653) (nunoplopes@sapo.pt@[81.193.154.146]) (envelope-sender ) by mta3 (qmail-ldap-1.03) with SMTP for ; 15 Apr 2004 11:57:01 -0000 Message-ID: <00cc01c422e1$46a4adc0$0100a8c0@pc07653> To: "PHPdev" Date: Thu, 15 Apr 2004 13:00:41 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Subject: Exceptions and a real example: Tidy From: nlopess@php.net ("Nuno Lopes") Hello, I've followed the war, sorry, discussion about exceptions. Now, let me introduce some problems I've found in Tidy. Look at the code: 'bogusvalue')); //because of throwing the exception, this function is never executed //thus making it complitely unusefull. echo tidy_config_count($tidy); } catch (tidy_exception $e) { echo $e; } /*********************************************************/ //an exception here. why? a BUG?!?!?! $tidy = new tidy(); $tidy->ParseString('test'); ?> These are just some examples. I don't hate exceptions, but whe they are misused... John said that Tidy should only generate exceptions with OO code, but as you can see in the above code, it generate exceptions with non-OO code. Nuno