From 2e4b6875619601df2b89ffc14971fab43adcd8e6 Mon Sep 17 00:00:00 2001 From: Sven Boemer Date: Fri, 8 Mar 2019 15:45:56 -0800 Subject: [PATCH] Write stack traces to stderr (#481) This will show up in the msbuild output with a higher importance by default, and may also align more closely with the expectations of command line users. @marek-safar the other option is to make this the behavior of monolinker as well. What do you think? --- src/linker/Linker/Driver.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/linker/Linker/Driver.cs b/src/linker/Linker/Driver.cs index e4426fcdc941..1e27a65e08e8 100644 --- a/src/linker/Linker/Driver.cs +++ b/src/linker/Linker/Driver.cs @@ -61,9 +61,8 @@ public static int Execute (string[] args, ILogger customLogger = null) driver.Run (customLogger); } catch (Exception e) { - Console.WriteLine ("Fatal error in {0}", _linker); - Console.WriteLine (e); - return 1; + Console.Error.WriteLine ("Fatal error in {0}", _linker); + throw; } return 0;