throwable_001.phpt 390 B

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