cvs: spl / spl_directory.c
| From: | Marcus Boerger | Date: | Mon, 25 Aug 2003 20:54:38 +0000 |
| Subject: | cvs: spl / spl_directory.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-23387@lists.php.net to get a copy of this message | ||
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;
}