Problem reading exception stack (using 5b3)

From: Date: Tue, 23 Dec 2003 01:04:42 +0000
Subject: Problem reading exception stack (using 5b3)
Groups: php.internals 
Request: Send a blank email to internals+get-6684@lists.php.net to get a copy of this message
From my current tests I get the following stack: [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 However, the code flow is as the following: 1) /home/mfischer/htdocs/php5/test.php(5): $db->connect("hostname=bla"); 'connect' method of object '$db' is called; not of object '$mysql' (only the class is called mysql) 2) /home/mfischer/php/Database/MySQL.php(30): $this->resource = System::mysql_connect($this->hostname, $this->username, $this->password); The static method 'mysql_connect' of the 'System' class is called (and not mysql->mysql_connect); 3) /home/mfischer/php/System.php(12): throw new Exception("Unable to connect to database$mysql_error"); So, for me it seems that a) the order of the stack is not right (0->1->2 should be 1->0->2) b) the called function on the stack doesn't reassemble the real names. In #1 it should be $db->connect and in #0 it should be System::mysql_connect; Any ideas about this? - Markus

« previous php.internals (#6684) next »