Permalink
Browse files

Reporting fatal errors only once

  • Loading branch information...
1 parent f391316 commit b10444c69eff54b04f2609f244e5a4d8f0bdd0dc @agross agross committed Feb 1, 2013
Showing with 2 additions and 3 deletions.
  1. +2 −3 Source/Machine.Specifications/Runner/Impl/AssemblyRunner.cs
@@ -21,7 +21,7 @@ public AssemblyRunner(ISpecificationRunListener listener, RunOptions options)
public void Run(Assembly assembly, IEnumerable<Context> contexts)
{
- var hasExecutableSpecifications = contexts.Where(x => x.HasExecutableSpecifications).Any();
+ var hasExecutableSpecifications = contexts.Any(x => x.HasExecutableSpecifications);
var explorer = new AssemblyExplorer();
var globalCleanups = new List<ICleanupAfterEveryContextInAssembly>(explorer.FindAssemblyWideContextCleanupsIn(assembly));
@@ -55,7 +55,6 @@ public void Run(Assembly assembly, IEnumerable<Context> contexts)
catch (Exception err)
{
_listener.OnFatalError(new ExceptionResult(err));
- throw;
}
}
}
@@ -68,4 +67,4 @@ public void Run(Assembly assembly, IEnumerable<Context> contexts)
runner.Run(context, _listener, _options, globalCleanups, supplements);
}
}
-}
+}

0 comments on commit b10444c

Please sign in to comment.