Skip to content
This repository was archived by the owner on Dec 18, 2017. It is now read-only.

Commit

Permalink
Always print stack traces when showing errors
Browse files Browse the repository at this point in the history
- We can't tell where errors occured so always show the stack trace
since it's better than hiding it.

#539
  • Loading branch information
davidfowl committed Aug 17, 2014
1 parent 0353ccf commit 4fbf1fb
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/klr.hosting.shared/RuntimeBootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ public static int Execute(string[] args)

private static void PrintErrors(Exception ex)
{
var enableTrace = Environment.GetEnvironmentVariable("KRE_TRACE") == "1";

while (ex != null)
{
if (ex is TargetInvocationException ||
Expand All @@ -61,14 +59,7 @@ private static void PrintErrors(Exception ex)
}
else
{
if (enableTrace)
{
Console.Error.WriteLine(ex);
}
else
{
Console.Error.WriteLine(ex.Message);
}
Console.Error.WriteLine(ex);
}

ex = ex.InnerException;
Expand Down Expand Up @@ -167,7 +158,7 @@ public static Task<int> ExecuteAsync(string[] args)
loadFile = path => loaderImpl.LoadFile(path);

AssemblyLoadContext.InitializeDefaultContext(loaderImpl);

if (loaderImpl.EnableMultiCoreJit())
{
loaderImpl.StartMultiCoreJitProfile("startup.prof");
Expand Down

0 comments on commit 4fbf1fb

Please sign in to comment.