summaryrefslogtreecommitdiff
path: root/Program.cs
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-02-04 14:16:28 +0100
committeremkael <emkael@tlen.pl>2018-02-04 14:25:55 +0100
commit6c65a7ded576e38ab19bf02dc92b92e41870c6bb (patch)
treee466532cc0880d436ad321157c1951156aa0b0c6 /Program.cs
parent33cca3ec0de7e4c1bbbf35a63bb4853254d316b5 (diff)
Waiting for keypress only on errors
Fix #1
Diffstat (limited to 'Program.cs')
-rw-r--r--Program.cs16
1 files changed, 9 insertions, 7 deletions
diff --git a/Program.cs b/Program.cs
index a03dd67..ea1eab3 100644
--- a/Program.cs
+++ b/Program.cs
@@ -73,9 +73,9 @@ namespace BCDD
}
else
{
- String error = "ERROR: unable to determine DD table for board " + boardNo;
+ String error = "unable to determine DD table for board " + boardNo;
errors.Add(String.Format("[{0}] {1}", filename, error));
- Console.WriteLine(error);
+ Console.WriteLine("ERROR: " + error);
}
}
catch (DllNotFoundException)
@@ -85,18 +85,20 @@ namespace BCDD
catch (Exception e)
{
errors.Add(String.Format("[{0}:{1}] {2}", filename, boardNo, e.Message));
- Console.WriteLine(e.Message);
+ Console.WriteLine("ERROR: " + e.Message);
}
}
file.Save();
}
- catch (DllNotFoundException)
+ catch (DllNotFoundException e)
{
- Console.WriteLine("libbcalcdds.dll could not be loaded - make sure it's present in application directory!");
+ errors.Add("libbcalcdds.dll could not be loaded - make sure it's present in application directory!");
+ Console.WriteLine("ERROR: " + e.Message);
break;
}
catch (Exception e)
{
+ errors.Add(e.Message);
Console.WriteLine("ERROR: " + e.Message);
}
}
@@ -105,9 +107,9 @@ namespace BCDD
foreach (String error in errors) {
Console.WriteLine(error);
}
+ Console.WriteLine("Press any key to continue...");
+ Console.ReadKey();
}
- Console.WriteLine("Press any key to continue...");
- Console.ReadKey();
}
}
}