From 732c094d52f565ad8627e019dbef4c4c77994429 Mon Sep 17 00:00:00 2001 From: emkael Date: Fri, 3 Jun 2016 13:48:54 +0200 Subject: * error summary on exit --- Program.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Program.cs') 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 files = Program.getFiles(args); + List errors = new List(); 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(); } -- cgit v1.2.3