Skip to content

Commit

Permalink
Better exception printing to aid issue #13
Browse files Browse the repository at this point in the history
  • Loading branch information
quarnster committed Jun 15, 2012
1 parent fc004b4 commit 165cd7f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions CompleteSharp.cs
Expand Up @@ -213,7 +213,7 @@ protected Type GetType(MyAppDomain ad, string basename, string[] templateParam)
} }
catch (Exception e) catch (Exception e)
{ {
System.Console.Error.WriteLine(e.Message); System.Console.Error.WriteLine("Exception: " + e.Message);
System.Console.Error.WriteLine(e.StackTrace); System.Console.Error.WriteLine(e.StackTrace);
} }
} }
Expand Down Expand Up @@ -347,7 +347,7 @@ public bool Execute(string[] args, ArrayList modules)
} }
catch (Exception e) catch (Exception e)
{ {
System.Console.Error.WriteLine(e.Message); System.Console.Error.WriteLine("Exception: " + e.Message);
System.Console.Error.WriteLine(e.StackTrace); System.Console.Error.WriteLine(e.StackTrace);
} }
} }
Expand Down Expand Up @@ -399,7 +399,7 @@ public bool Execute(string[] args, ArrayList modules)
} }
catch (Exception e) catch (Exception e)
{ {
System.Console.Error.WriteLine("exception: " + e.Message); System.Console.Error.WriteLine("Exception: " + e.Message);
System.Console.Error.WriteLine(e.StackTrace); System.Console.Error.WriteLine(e.StackTrace);
} }


Expand Down Expand Up @@ -637,7 +637,8 @@ public bool Execute(string[] args, ArrayList modules)
} }
catch (Exception e) catch (Exception e)
{ {
System.Console.Error.WriteLine(e); System.Console.Error.WriteLine("Exception: " + e.Message);
System.Console.Error.WriteLine(e.StackTrace);
} }
return true; return true;
} }
Expand Down Expand Up @@ -678,7 +679,7 @@ public void LoadAssemblies()
} }
catch (Exception e) catch (Exception e)
{ {
System.Console.Error.WriteLine("exception: " + e.Message); System.Console.Error.WriteLine("Exception: " + e.Message);
System.Console.Error.WriteLine(e.StackTrace); System.Console.Error.WriteLine(e.StackTrace);
} }
} }
Expand All @@ -702,12 +703,20 @@ private void CheckUpdate()
bool reload = false; bool reload = false;
for (int i = 0; i < times.Length; i++) for (int i = 0; i < times.Length; i++)
{ {
FileInfo fi = new FileInfo(assemblies[i]); try
if (fi.LastWriteTime > times[i])
{ {
System.Console.Error.WriteLine("changed: " + assemblies[i] + ", " + fi.LastWriteTime + ", " + times[i]); FileInfo fi = new FileInfo(assemblies[i]);
reload = true; if (fi.LastWriteTime > times[i])
break; {
System.Console.Error.WriteLine("changed: " + assemblies[i] + ", " + fi.LastWriteTime + ", " + times[i]);
reload = true;
break;
}
}
catch (Exception e)
{
System.Console.Error.WriteLine("Exception: " + e.Message);
System.Console.Error.WriteLine(e.StackTrace);
} }
} }
if (reload) if (reload)
Expand Down Expand Up @@ -772,14 +781,15 @@ public static void Main(string[] arg)
} }
catch (Exception e) catch (Exception e)
{ {
System.Console.Error.WriteLine(e.Message); System.Console.Error.WriteLine("Exception:" + e.Message);
System.Console.Error.WriteLine(e.StackTrace); System.Console.Error.WriteLine(e.StackTrace);
} }
} }
} }
catch (Exception e) catch (Exception e)
{ {
System.Console.Error.WriteLine(e); System.Console.Error.WriteLine("Exception:" + e.Message);
System.Console.Error.WriteLine(e.StackTrace);
} }
} }
} }
Expand Down
Binary file modified CompleteSharp.exe
Binary file not shown.

0 comments on commit 165cd7f

Please sign in to comment.