Last active
September 10, 2015 23:50
-
-
Save kellegous/7315442a1f4bfebbc265 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function foo() { | |
| try { | |
| throw new Exception("ex1"); | |
| } finally { | |
| try { | |
| throw new Exception("ex2"); | |
| } catch (Exception $e) { | |
| printf("caught in finally message=%s\n", $e->getMessage()); | |
| } | |
| echo "end of finally.\n"; | |
| } | |
| } | |
| try { | |
| foo(); | |
| echo "this should not get executed.\n"; | |
| } catch (Exception $e) { | |
| printf("caught from call to foo() messsage=%s\n", $e->getMessage()); | |
| } | |
| echo "all done.\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| caught in finally message=ex2 | |
| end of finally. | |
| this should not get executed. | |
| all done. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment