Annotation of embedaddon/php/ext/standard/tests/general_functions/bug44295.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: user defined error handler + set_error_handling(EH_THROW)
3: --SKIPIF--
4: <?php if (!extension_loaded("spl") || is_dir('/this/path/does/not/exist')) die("skip"); ?>
5: --FILE--
6: <?php
7: $dir = '/this/path/does/not/exist';
8:
9: set_error_handler('my_error_handler');
10: function my_error_handler() {$a = func_get_args(); print "in error handler\n"; }
11:
12: try {
13: print "before\n";
14: $iter = new DirectoryIterator($dir);
15: print get_class($iter) . "\n";
16: print "after\n";
17: } catch (Exception $e) {
18: print "in catch: ".$e->getMessage()."\n";
19: }
20: ?>
21: ==DONE==
22: <?php exit(0); ?>
23: --EXPECT--
24: before
25: in catch: DirectoryIterator::__construct(/this/path/does/not/exist): failed to open dir: No such file or directory
26: ==DONE==
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>