Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:6711 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5302 invoked by uid 1010); 23 Dec 2003 23:29:17 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 5261 invoked from network); 23 Dec 2003 23:29:17 -0000 Received: from unknown (HELO sunshine.home) (62.178.227.34) by pb1.pair.com with SMTP; 23 Dec 2003 23:29:17 -0000 Received: from mfischer by sunshine.home with local (Exim 4.22) id 1AYvar-00078o-NY for internals@lists.php.net; Wed, 24 Dec 2003 00:05:37 +0100 Date: Wed, 24 Dec 2003 00:05:35 +0100 To: internals@lists.php.net Message-ID: <20031223230534.GA27436@gjat.josefine.at> Mail-Followup-To: Markus Fischer , internals@lists.php.net References: <20031223010441.GA17440@gjat.josefine.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031223010441.GA17440@gjat.josefine.at> X-Editor: Vim http://www.vim.org/ X-PGP-Key: 0xC2272BD0 at wwwkeys.eu.pgp.net X-PGP-Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0 User-Agent: Microsoft Outlook Express 5.50.4807.1700.314 X-Spamfilter: Fighting it with http://www.spamassassin.org/ and http://razor.sourceforge.net/ Subject: Re: [PHP-DEV] Problem reading exception stack (using 5b3) From: mfischer@gjat.josefine.at (Markus Fischer) Maybe some more information about how my code files are layed out may be helpful. /home/mfischer/htdocs/php5/test.php This is my test script which is executed via apache. It includes the file 'Database/MySQL.php'. /home/mfischer/php/Database/MySQL.php Includes the files 'Database/DatabaseInterfaces.php' and 'System.php'. /home/mfischer/php/Database/DatabaseInterfaces.php Provides 'interface DatabaseInterface' and 'interface DatabaseResultInterface'. /home/mfischer/php/System.php Contains the class 'System' which only has static methods which wrap 1:1 with PHP (native) functions but providing Exceptions in case of errors. So, my code flow until the exception is thrown is: test.php(5) calls $db->connect() Database/MySQL.php(30) calls System::mysql_connect() System.php(12) throws the Exception However, the stacktrace reported from PHP reads: [23-Dec-2003 01:55:10] PHP Fatal error: Uncaught exception 'exception' with message 'Unable to connect to database; mysql_error = Unknown MySQL Server Host 'bla' (4)' in /home/mfischer/php/System.php:12 Stack trace: #0 /home/mfischer/php/Database/MySQL.php(30): mysql->mysql_connect('bla', '', '') #1 /home/mfischer/htdocs/php5/test.php(5): mysql->connect('hostname=bla') #2 {main} thrown in /home/mfischer/php/System.php on line 12 My problem is (in order of priority): 1) the order in the trace is not correct 2) the called methods do not match my code regards, - Markus