From d108d1ce214a2386293f66e7b73b45ed33311600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miskolczi=20Rich=C3=A1rd?= Date: Sun, 16 Apr 2023 21:03:56 +0200 Subject: [PATCH] Including erroName parameter --- CLI/Program.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CLI/Program.cs b/CLI/Program.cs index 8e0a815..e235c90 100644 --- a/CLI/Program.cs +++ b/CLI/Program.cs @@ -61,9 +61,9 @@ class Program return 0; } - static void ErrorOccured(Exception e) + static void ErrorOccured(Exception e, string errorName = "Error") { - Console.WriteLine($"The following error occured while trying to load your profile:\n{e}\nMore details:\n{e.ToString()}"); + Console.WriteLine($"{errorName}: {e}\nMore details:\n{e.ToString()}"); } static void HelpMessage()