Make MatterControl exit if errors occur.

This commit is contained in:
larsbrubaker 2014-02-26 12:21:05 -08:00
parent 740e16319c
commit c4cac518e1
2 changed files with 8 additions and 0 deletions

View file

@ -83,6 +83,10 @@ namespace MatterHackers.MatterControl
commandLineArgs.CopyTo(testCommands, 2);
}
testDispatch.RunTests(testCommands);
if (testDispatch.HadErrors)
{
return;
}
}
//WriteTestGCodeFile();

View file

@ -9,6 +9,9 @@ namespace MatterHackers.MatterControl.Testing
{
public class TestingDispatch
{
bool hadErrors = false;
public bool HadErrors { get { return hadErrors; } }
string errorLogFileName = null;
public TestingDispatch()
{
@ -32,6 +35,7 @@ namespace MatterHackers.MatterControl.Testing
void DumpException(Exception e)
{
hadErrors = true;
using (StreamWriter w = File.AppendText(errorLogFileName))
{
w.WriteLine(e.Message);