Fix error display

This commit is contained in:
Frank A. Krueger 2017-07-06 16:12:34 -07:00
parent 5a79d3646d
commit 508af4f69b
1 changed files with 3 additions and 5 deletions

View File

@ -113,8 +113,7 @@ namespace Ooui
System.Diagnostics.Process.Start (cmd, args); System.Diagnostics.Process.Start (cmd, args);
} }
catch (Exception ex) { catch (Exception ex) {
System.Console.WriteLine("FAILED TO EXEC"); Error ("FAILED TO EXEC", ex);
System.Console.WriteLine(ex);
} }
} }
@ -208,7 +207,7 @@ namespace Ooui
handler.Respond (listenerContext, token); handler.Respond (listenerContext, token);
} }
catch (Exception ex) { catch (Exception ex) {
System.Console.WriteLine(ex); Error ("Handler failed to respond", ex);
try { try {
response.StatusCode = 500; response.StatusCode = 500;
response.Close (); response.Close ();
@ -521,10 +520,9 @@ namespace Ooui
{ {
public Style this[string selector] { public Style this[string selector] {
get { get {
Style r;
var key = selector ?? ""; var key = selector ?? "";
lock (styles) { lock (styles) {
if (!styles.TryGetValue (key, out r)) { if (!styles.TryGetValue (key, out Style r)) {
r = new Style (); r = new Style ();
styles.Add (key, r); styles.Add (key, r);
} }