helly Mon Aug 25 16:54:38 2003 EDT
Modified files:
/spl spl_directory.c
Log:
Exceptions work now
Index: spl/spl_directory.c
diff -u spl/spl_directory.c:1.7 spl/spl_directory.c:1.8
--- spl/spl_directory.c:1.7 Wed Aug 20 20:10:49 2003
+++ spl/spl_directory.c Mon Aug 25 16:54:37 2003
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_directory.c,v 1.7 2003/08/21 00:10:49 helly Exp $ */
+/* $Id: spl_directory.c,v 1.8 2003/08/25 20:54:37 helly Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -119,6 +119,7 @@
/* {{{ spl_dir_open */
static void spl_dir_open(spl_dir_object* intern, char *path TSRMLS_DC)
{
+ /* we are using EH_THORW so REPORT_ERRORS results in exceptions */
intern->dirp = php_stream_opendir(path, ENFORCE_SAFE_MODE|REPORT_ERRORS, NULL);
intern->path = estrdup(path);
@@ -184,10 +185,10 @@
char *path;
long len;
-/* exceptions do not work yet
- php_set_error_handling(EH_THROW, zend_exception_get_default() TSRMLS_CC);*/
+ php_set_error_handling(EH_THROW, zend_exception_get_default() TSRMLS_CC);
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &path, &len) ==
FAILURE) {
+ php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
return;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php