cvs: php-src /tests/lang 039.phpt

From: Date: Sun, 27 Jun 2004 13:28:01 +0000
Subject: cvs: php-src /tests/lang 039.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-27713@lists.php.net to get a copy of this message
helly Sun Jun 27 09:28:01 2004 EDT Added files: /php-src/tests/lang 039.phpt Log: Add more tests http://cvs.php.net/co.php/php-src/tests/lang/039.phpt?r=1.1&p=1 Index: php-src/tests/lang/039.phpt +++ php-src/tests/lang/039.phpt --TEST-- Catch Interfaces --FILE-- <?php interface Catchable { } class MyException extends Exception implements Catchable { function __construct($errstr, $errno, $errfile, $errline) { parent::__construct($errstr, $errno); $this->file = $errfile; $this->line = $errline; } } function Error2Exception($errno, $errstr, $errfile, $errline) { throw new MyException($errstr, $errno, $errfile, $errline); } $err_msg = 'no exception'; set_error_handler('Error2Exception'); try { $con = pg_connect('host=localhost dbname=xtest'); } catch (Catchable $e) { echo "Catchable\n"; } catch (Exception $e) { echo "Exception\n"; } ?> ===DONE=== --EXPECTF-- Catchable ===DONE===

« previous php.cvs (#27713) next »