Make MatterControl exit if errors occur.
This commit is contained in:
parent
740e16319c
commit
c4cac518e1
2 changed files with 8 additions and 0 deletions
|
|
@ -83,6 +83,10 @@ namespace MatterHackers.MatterControl
|
|||
commandLineArgs.CopyTo(testCommands, 2);
|
||||
}
|
||||
testDispatch.RunTests(testCommands);
|
||||
if (testDispatch.HadErrors)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//WriteTestGCodeFile();
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue