From 3770ff9b573bfcc9c29a0e0ea862420b982cbaf8 Mon Sep 17 00:00:00 2001 From: C9Glax <13404778+C9Glax@users.noreply.github.com> Date: Sun, 13 Nov 2022 16:55:22 +0100 Subject: [PATCH] error --- Executable/Program.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Executable/Program.cs b/Executable/Program.cs index 7d6e19b..b985c17 100644 --- a/Executable/Program.cs +++ b/Executable/Program.cs @@ -19,16 +19,16 @@ switch (args.Length) onlyJunctions = true; if (!File.Exists(xmlPath)) { - logger.Log(LogLevel.ERROR, "File {0} does not exist.", xmlPath); - return; + logger.Log(LogLevel.INFO, "File {0} does not exist.", xmlPath); + throw new FileNotFoundException(xmlPath); } break; case 2: xmlPath = args[0]; if (!File.Exists(xmlPath)) { - logger.Log(LogLevel.ERROR, "File {0} does not exist.", xmlPath); - return; + logger.Log(LogLevel.INFO, "File {0} does not exist.", xmlPath); + throw new FileNotFoundException(xmlPath); } if (confirmation.Contains(args[1].ToLower())) onlyJunctions = true; @@ -36,7 +36,7 @@ switch (args.Length) onlyJunctions = false; break; default: - logger.Log(LogLevel.ERROR, "Invalid Arguments."); + logger.Log(LogLevel.INFO, "Invalid Arguments."); logger.Log(LogLevel.INFO, "Arguments can be:"); logger.Log(LogLevel.INFO, "arg0 Path to file: string"); logger.Log(LogLevel.INFO, "arg1 onlyJunctions: 'yes', '1', 'true'");