xref: /PHP-7.2/Zend/tests/exception_007.phpt (revision 3ae995f0)
1--TEST--
2Setting previous exception
3--FILE--
4<?php
5
6try {
7	try {
8		throw new Exception("First", 1, new Exception("Another", 0, NULL));
9	}
10	catch (Exception $e) {
11		throw new Exception("Second", 2, $e);
12	}
13}
14catch (Exception $e) {
15	throw new Exception("Third", 3, $e);
16}
17
18?>
19===DONE===
20--EXPECTF--
21Fatal error: Uncaught Exception: Another in %sexception_007.php:%d
22Stack trace:
23#0 {main}
24
25Next Exception: First in %sexception_007.php:%d
26Stack trace:
27#0 {main}
28
29Next Exception: Second in %sexception_007.php:%d
30Stack trace:
31#0 {main}
32
33Next Exception: Third in %sexception_007.php:%d
34Stack trace:
35#0 {main}
36  thrown in %sexception_007.php on line %d
37