xref: /PHP-5.4/Zend/tests/exception_007.phpt (revision 610c7fbe)
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 'Exception' with message 'Another' in %sexception_007.php:%d
22Stack trace:
23#0 {main}
24
25Next exception 'Exception' with message 'First' in %sexception_007.php:%d
26Stack trace:
27#0 {main}
28
29Next exception 'Exception' with message 'Second' in %sexception_007.php:%d
30Stack trace:
31#0 {main}
32
33Next exception 'Exception' with message 'Third' in %sexception_007.php:%d
34Stack trace:
35#0 {main}
36  thrown in %sexception_007.php on line %d
37