mirror of
https://github.com/Stone-Red-Code/StoneRed.LogicSimulator.git
synced 2026-09-04 00:56:23 +02:00
Log unhanded exceptions
This commit is contained in:
@@ -1,2 +1,9 @@
|
||||
using StoneRed.LogicSimulator.Srls srls = new StoneRed.LogicSimulator.Srls();
|
||||
using Myra.Utility;
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
AppDomain.CurrentDomain.UnhandledException += (_, e) => File.WriteAllText(Path.Combine(PathUtils.ExecutingAssemblyDirectory, "error.txt"), e.ExceptionObject.ToString());
|
||||
|
||||
using StoneRed.LogicSimulator.Srls srls = new StoneRed.LogicSimulator.Srls();
|
||||
srls.Run();
|
||||
@@ -20,7 +20,7 @@ internal class TestLogicGate : LogicGate, Interfaces.IDrawable
|
||||
{
|
||||
get
|
||||
{
|
||||
Draw();
|
||||
texture.SetData(colors);
|
||||
return texture;
|
||||
}
|
||||
}
|
||||
@@ -28,12 +28,6 @@ internal class TestLogicGate : LogicGate, Interfaces.IDrawable
|
||||
protected internal override void Initialize()
|
||||
{
|
||||
texture = CreateTexture(3, 3);
|
||||
texture.SetData(new Color[]
|
||||
{
|
||||
Color.Red, Color.Blue, Color.Red,
|
||||
Color.Blue, Color.Red, Color.Blue,
|
||||
Color.Red, Color.Blue, Color.Red
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Execute()
|
||||
@@ -43,11 +37,6 @@ internal class TestLogicGate : LogicGate, Interfaces.IDrawable
|
||||
colors[i] = GetInputBit(i) == 1 ? Color.Red : Color.Gray;
|
||||
}
|
||||
}
|
||||
|
||||
private void Draw()
|
||||
{
|
||||
texture.SetData(colors);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user