##// END OF EJS Templates
Added awaiters to promises...
Added awaiters to promises Added static methods to Promise Resolve, Reject, All. Updated promise helpers

File last commit:

r248:5cb4826c2c2a v3
r248:5cb4826c2c2a v3
Show More
ExceptionHelpers.cs
17 lines | 571 B | text/x-csharp | CSharpLexer
using System;
using System.Reflection;
using System.Runtime.ExceptionServices;
namespace Implab {
public static class ExceptionHelpers {
public static void Rethrow(this Exception that) {
ExceptionDispatchInfo.Capture(that).Throw();
}
public static void ThrowInvocationException(this Exception that) {
if (that is OperationCanceledException)
throw new OperationCanceledException("Operation cancelled", that);
else
throw new TargetInvocationException(that);
}
}
}