From 9add798efc475a3d8794253f8e68dc4be2721370 Mon Sep 17 00:00:00 2001 From: mouzedrift <43358824+mouzedrift@users.noreply.github.com> Date: Sun, 9 Mar 2025 20:58:39 +0100 Subject: [PATCH] Add path logging when certain files can't be found --- Maple2.File.Ingest/Program.cs | 7 ++++--- Maple2.Tools/Dotenv.cs | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Maple2.File.Ingest/Program.cs b/Maple2.File.Ingest/Program.cs index bda9a5173..c1270048e 100644 --- a/Maple2.File.Ingest/Program.cs +++ b/Maple2.File.Ingest/Program.cs @@ -49,15 +49,16 @@ string serverPath = Path.Combine(ms2Root, "Server.m2d"); if (!File.Exists(xmlPath)) { - throw new FileNotFoundException("Could not find Xml.m2d file"); + throw new FileNotFoundException($"Could not find Xml.m2d file at path: {xmlPath}"); } if (!File.Exists(exportedPath)) { - throw new FileNotFoundException("Could not find Exported.m2d file"); + throw new FileNotFoundException($"Could not find Exported.m2d file at path: {exportedPath}"); } if (!File.Exists(serverPath)) { - throw new FileNotFoundException("Could not find Server.m2d file, check discord for this file. Link in README.md"); + throw new FileNotFoundException($"Could not find Server.m2d file at path: {serverPath}\n" + + "You can download this file from here: https://github.com/Zintixx/MapleStory2-XML/releases/latest"); } string? server = Environment.GetEnvironmentVariable("DB_IP"); diff --git a/Maple2.Tools/Dotenv.cs b/Maple2.Tools/Dotenv.cs index db59d5310..4cd50c134 100644 --- a/Maple2.Tools/Dotenv.cs +++ b/Maple2.Tools/Dotenv.cs @@ -7,7 +7,7 @@ public static void Load() { string dotenv = Path.Combine(Paths.SOLUTION_DIR, ".env"); if (!File.Exists(dotenv)) { - Console.WriteLine("No .env file found"); + Console.WriteLine($"No .env file found at path: {dotenv}"); return; }