xref: /PHP-7.2/Zend/tests/throwable_002.phpt (revision f1d7e3ca)
1--TEST--
2Test using an Exception as the previous Throwable for an Error
3--CREDITS--
4Aaron Piotrowski <aaron@icicle.io>
5--FILE--
6<?php
7throw new Error('Error message', 0, new Exception('Exception message'));
8?>
9--EXPECTF--
10Fatal error: Uncaught Exception: Exception message in %s:%d
11Stack trace:
12#0 {main}
13
14Next Error: Error message in %s:%d
15Stack trace:
16#0 {main}
17  thrown in %s on line %d
18