Skip to content

Instantly share code, notes, and snippets.

@Azerothian
Created December 8, 2013 07:39
Show Gist options
  • Select an option

  • Save Azerothian/7854358 to your computer and use it in GitHub Desktop.

Select an option

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
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