exception_007.phpt 751 B

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