exception_001.phpt 685 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. --TEST--
  2. Testing nested exceptions
  3. --FILE--
  4. <?php
  5. try {
  6. try {
  7. try {
  8. try {
  9. throw new Exception();
  10. } catch (Exception $e) {
  11. var_dump($e->getMessage());
  12. throw $e;
  13. }
  14. } catch (Exception $e) {
  15. var_dump($e->getMessage());
  16. throw $e;
  17. }
  18. } catch (Exception $e) {
  19. var_dump($e->getMessage());
  20. throw $e;
  21. }
  22. } catch (Exception $e) {
  23. var_dump($e->getMessage());
  24. throw $e;
  25. }
  26. ?>
  27. --EXPECTF--
  28. string(0) ""
  29. string(0) ""
  30. string(0) ""
  31. string(0) ""
  32. Fatal error: Uncaught Exception in %s:%d
  33. Stack trace:
  34. #0 {main}
  35. thrown in %s on line %d