Created
December 8, 2013 07:39
-
-
Save Azerothian/7854358 to your computer and use it in GitHub Desktop.
catch example that will maintain the original stack when a exception has been caught and is being rethrown
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
| public void Test() | |
| { | |
| try { | |
| throw new Exception(); | |
| } catch (Exception ex) | |
| { | |
| // do logging or what ever | |
| throw; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment