diff --git a/Sharpii/Exit Codes.txt b/Sharpii/Exit Codes.txt index 482528a..aec2faa 100644 --- a/Sharpii/Exit Codes.txt +++ b/Sharpii/Exit Codes.txt @@ -158,4 +158,9 @@ Ensure all files are present. Exit Code: 16030/32 Invalid ID or Missing CETK (SHARPII_NET_CORE_NUSD_REMOTE_404) The remote server returned a 404 error. Check your Title ID. -If you have a CETK file, please place it in the same directory as Sharpii saves the NUS Files to. \ No newline at end of file +If you have a CETK file, please place it in the same directory as Sharpii saves the NUS Files to. + +Exit Code: 16031/33 +A WebRequest error has occured and stopped a NUS download. (SHARPII_NET_CORE_NUSD_WEBREQUEST_FAIL) +A WebRequest Error occurred. This usually means that Sharpii can not properly download and save the file. +Please ensure you have the proper permissions to use the current folder or files. \ No newline at end of file diff --git a/Sharpii/NUSD.cs b/Sharpii/NUSD.cs index 33effb4..55eb55b 100644 --- a/Sharpii/NUSD.cs +++ b/Sharpii/NUSD.cs @@ -446,19 +446,19 @@ namespace Sharpii } return; } - if (ex.Message == "Index was outside the bounds of the array.") + if (ex.Message == "ERROR DETAILS: Downloading Content Failed:\nAn exception occurred during a WebClient request.") { - Console.WriteLine("A WebRequest Error occurred. This usually means that Sharpii can not properly download the file."); + Console.WriteLine("A WebClient Request Error occurred. This usually means that Sharpii can not properly download the file."); Console.WriteLine("Please ensure you have the proper permissions."); - Console.WriteLine("Error: SHARPII_NET_CORE_NUSD_MISSING_FILES_01"); + Console.WriteLine("Error: SHARPII_NET_CORE_NUSD_WEBREQUEST_FAIL"); ExceptionListRan = 1; if (OperatingSystem.Windows()) { - Environment.Exit(0x00003E9D); + Environment.Exit(0x00003E9F); } else { - Environment.Exit(0x0000001F); + Environment.Exit(0x00000021); } } if (ExceptionListRan == 0)