From 508af4f69b29ed46c2eff535964406b429dc6c08 Mon Sep 17 00:00:00 2001 From: "Frank A. Krueger" Date: Thu, 6 Jul 2017 16:12:34 -0700 Subject: [PATCH] Fix error display --- Ooui/UI.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Ooui/UI.cs b/Ooui/UI.cs index 7528718..49593ab 100644 --- a/Ooui/UI.cs +++ b/Ooui/UI.cs @@ -113,8 +113,7 @@ namespace Ooui System.Diagnostics.Process.Start (cmd, args); } catch (Exception ex) { - System.Console.WriteLine("FAILED TO EXEC"); - System.Console.WriteLine(ex); + Error ("FAILED TO EXEC", ex); } } @@ -208,7 +207,7 @@ namespace Ooui handler.Respond (listenerContext, token); } catch (Exception ex) { - System.Console.WriteLine(ex); + Error ("Handler failed to respond", ex); try { response.StatusCode = 500; response.Close (); @@ -521,10 +520,9 @@ namespace Ooui { public Style this[string selector] { get { - Style r; var key = selector ?? ""; lock (styles) { - if (!styles.TryGetValue (key, out r)) { + if (!styles.TryGetValue (key, out Style r)) { r = new Style (); styles.Add (key, r); }