From 9597bb1d9393cfcceaf3c20ad83ad467b390c305 Mon Sep 17 00:00:00 2001 From: Vort Date: Fri, 6 Jan 2017 14:16:32 +0200 Subject: [PATCH] Don't crash on error --- Program.cs | 12 +++++++++++- Tracer.cs | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Program.cs b/Program.cs index 8bfebae..54914ca 100644 --- a/Program.cs +++ b/Program.cs @@ -56,6 +56,7 @@ static bool ProcessArgs(string[] args, ref bool go) static void Main(string[] args) { Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; + Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture; string exeDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); Directory.SetCurrentDirectory(exeDir); @@ -79,7 +80,16 @@ static void Main(string[] args) { Config.Write(); if (go) - new Tracer(); + { + try + { + new Tracer(); + } + catch (Exception e) + { + Console.Error.WriteLine(e); + } + } else Console.WriteLine(""); } diff --git a/Tracer.cs b/Tracer.cs index 6b07331..58fd1ef 100644 --- a/Tracer.cs +++ b/Tracer.cs @@ -41,7 +41,7 @@ void WriteOsm(List result) } Console.WriteLine(" "); Console.WriteLine(" "); - Console.WriteLine(" "); + Console.WriteLine(" "); Console.WriteLine(" "); Console.WriteLine(" "); Console.WriteLine("");