This holds a couple of exception helper methods I use. The first is PreserveStackTrace. This allows you to rethrow an exception without changing it's stack trace. This make it look like the exception wasn't intercepted and rethrown.

The second is RethrowInnerExceptionIfTargetInvocationException. If you couldn't figure it out from the name, this method runs a chunk of code and catches any TargetInvocationException that may be thrown. If one is thrown then the InnerException is rethrown preserving the original stack trace.

Last edited Apr 23, 2009 at 8:07 PM by JeffLeBert, version 1

Comments

No comments yet.