C# Class Testeroids.ExceptionEnlightenment

The default exception enlightenment, which will use ExceptionDispatchInfo if possible, falling back on Exception.PrepForRemoting, with a final fallback on P:System.Exception.Data.
NOTE: Copied from Nito.AsyncEx in order to avoid unnecessary dependencies. This will no longer be necessary once we move to .NET Framework 4.5.
Show file Open project: Testeroids/Testeroids Class Usage Examples

Public Methods

Method Description
PrepareForRethrow ( Exception exception ) : Exception

Private Methods

Method Description
ExceptionEnlightenment ( ) : System

Examines the current runtime and initializes the static delegates appropriately.

TryAddStackTrace ( Exception exception ) : void

Attempts to add the original stack trace to the P:System.Exception.Data collection.

TryGetMethod ( Type type, string name, BindingFlags flags ) : MethodInfo

Attempts to look up a method for a type, handling vexing exceptions.

Method Details

PrepareForRethrow() public static method

public static PrepareForRethrow ( Exception exception ) : Exception
exception System.Exception
return System.Exception