コード例 #1
0
 private static async Task RunAndStoreExceptionsAsync(this SpecFlowContext context, Func <Task> action, string key)
 {
     TeardownExceptionsBindings.VerifyBindingAvailable(context);
     try
     {
         await action().ConfigureAwait(false);
     }
     catch (Exception x)
     {
         StoreExceptionInContext(context, x, key);
     }
 }
コード例 #2
0
 private static void RunAndStoreExceptions(this SpecFlowContext context, Action action, string key)
 {
     TeardownExceptionsBindings.VerifyBindingAvailable(context);
     try
     {
         action();
     }
     catch (Exception x)
     {
         StoreExceptionInContext(context, x, key);
     }
 }