From 474e1e031e438ffc3a5c32d1446f7b1d9fb5c922 Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Fri, 8 Mar 2019 14:55:31 -0600 Subject: [PATCH] hactoolnet: Write errors to stderr --- src/hactoolnet/Program.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hactoolnet/Program.cs b/src/hactoolnet/Program.cs index b3049637..d2445d29 100644 --- a/src/hactoolnet/Program.cs +++ b/src/hactoolnet/Program.cs @@ -16,15 +16,15 @@ namespace hactoolnet catch (MissingKeyException ex) { string name = ex.Type == KeyType.Title ? $"Title key for rights ID {ex.Name}" : ex.Name; - Console.WriteLine($"\nERROR: {ex.Message}\nA required key is missing.\nKey name: {name}\n"); + Console.Error.WriteLine($"\nERROR: {ex.Message}\nA required key is missing.\nKey name: {name}\n"); } catch (Exception ex) { - Console.WriteLine($"\nERROR: {ex.Message}\n"); + Console.Error.WriteLine($"\nERROR: {ex.Message}\n"); - Console.WriteLine("Additional information:"); - Console.WriteLine(ex.GetType().FullName); - Console.WriteLine(ex.StackTrace); + Console.Error.WriteLine("Additional information:"); + Console.Error.WriteLine(ex.GetType().FullName); + Console.Error.WriteLine(ex.StackTrace); } return 1;