summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-06-03 13:48:54 +0200
committeremkael <emkael@tlen.pl>2016-06-03 13:48:54 +0200
commit732c094d52f565ad8627e019dbef4c4c77994429 (patch)
tree50a543a0f5b40ba3cd8cbb8aeb28df28e66043b6
parent2b390ec5ae5c93a40a480a124c2cac8c90b61f9d (diff)
* error summary on exit
-rw-r--r--Program.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/Program.cs b/Program.cs
index 2e793c4..a03dd67 100644
--- a/Program.cs
+++ b/Program.cs
@@ -35,6 +35,7 @@ namespace BCDD
static void Main(string[] args)
{
List<String> files = Program.getFiles(args);
+ List<String> errors = new List<String>();
if (files.Count > 0)
{
foreach (String filename in files)
@@ -72,7 +73,9 @@ namespace BCDD
}
else
{
- Console.WriteLine("ERROR: unable to determine DD table for board " + boardNo);
+ String error = "ERROR: unable to determine DD table for board " + boardNo;
+ errors.Add(String.Format("[{0}] {1}", filename, error));
+ Console.WriteLine(error);
}
}
catch (DllNotFoundException)
@@ -81,6 +84,7 @@ namespace BCDD
}
catch (Exception e)
{
+ errors.Add(String.Format("[{0}:{1}] {2}", filename, boardNo, e.Message));
Console.WriteLine(e.Message);
}
}
@@ -96,6 +100,12 @@ namespace BCDD
Console.WriteLine("ERROR: " + e.Message);
}
}
+ if (errors.Count > 0) {
+ Console.WriteLine("Following ERRORs occured:");
+ foreach (String error in errors) {
+ Console.WriteLine(error);
+ }
+ }
Console.WriteLine("Press any key to continue...");
Console.ReadKey();
}