mirror of
https://github.com/TheShadowEevee/Sharpii-NetCore.git
synced 2025-01-11 23:08:49 -06:00
Added an error and proper codes for not having all the files when packing a wad.
Added an error and proper codes for not having all the files when packing a wad. Previously would return the cryptic "Index was outside the bounds of the array." error.
This commit is contained in:
parent
2fb3e21d2d
commit
588a692b05
4 changed files with 44 additions and 7 deletions
|
@ -572,6 +572,16 @@ namespace Sharpii
|
||||||
Console.WriteLine("");
|
Console.WriteLine("");
|
||||||
ErrCodeFound = 1;
|
ErrCodeFound = 1;
|
||||||
}
|
}
|
||||||
|
if (args[1] == "SHARPII_NET_CORE_NUSD_MISSING_FILES_01")
|
||||||
|
{
|
||||||
|
Console.WriteLine("");
|
||||||
|
Console.WriteLine("You need to have all the required .app files, a tmd file, a tik file, and a cert file to pack a wad.");
|
||||||
|
Console.WriteLine("Ensure all files are present");
|
||||||
|
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
|
||||||
|
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
|
||||||
|
Console.WriteLine("");
|
||||||
|
ErrCodeFound = 1;
|
||||||
|
}
|
||||||
if (ErrCodeFound != 1)
|
if (ErrCodeFound != 1)
|
||||||
{
|
{
|
||||||
Error_help();
|
Error_help();
|
||||||
|
|
|
@ -344,6 +344,17 @@ namespace Sharpii
|
||||||
Console.WriteLine("");
|
Console.WriteLine("");
|
||||||
ErrCodeFound = 1;
|
ErrCodeFound = 1;
|
||||||
}
|
}
|
||||||
|
if (args[1] == "16029")
|
||||||
|
{
|
||||||
|
Console.WriteLine("");
|
||||||
|
Console.WriteLine("Not all files needed to pack a wad are present. (SHARPII_NET_CORE_NUSD_MISSING_FILES_01)");
|
||||||
|
Console.WriteLine("You need to have all the required .app files, a tmd file, a tik file, and a cert file to pack a wad.");
|
||||||
|
Console.WriteLine("Ensure all files are present");
|
||||||
|
Console.WriteLine("If that doesn't help, open an issue on GitHub!");
|
||||||
|
Console.WriteLine("https://github.com/TheShadowEevee/Sharpii-NetCore/issues");
|
||||||
|
Console.WriteLine("");
|
||||||
|
ErrCodeFound = 1;
|
||||||
|
}
|
||||||
if (ErrCodeFound != 1)
|
if (ErrCodeFound != 1)
|
||||||
{
|
{
|
||||||
ExitCode_help();
|
ExitCode_help();
|
||||||
|
|
|
@ -144,3 +144,8 @@ Exit Code: 16028
|
||||||
ID Flag was used, but invalid id provided. (SHARPII_NET_CORE_xxx_BAD_ID_01)
|
ID Flag was used, but invalid id provided. (SHARPII_NET_CORE_xxx_BAD_ID_01)
|
||||||
You used the -ID flag, but an invalid id was provided.
|
You used the -ID flag, but an invalid id was provided.
|
||||||
Provide a proper id.
|
Provide a proper id.
|
||||||
|
|
||||||
|
Exit Code: 16029
|
||||||
|
Not all files needed to pack a wad are present. (SHARPII_NET_CORE_NUSD_MISSING_FILES_01)
|
||||||
|
You need to have all the required .app files, a tmd file, a tik file, and a cert file to pack a wad.
|
||||||
|
Ensure all files are present.
|
|
@ -23,6 +23,7 @@ namespace Sharpii
|
||||||
{
|
{
|
||||||
partial class WAD_Stuff
|
partial class WAD_Stuff
|
||||||
{
|
{
|
||||||
|
public static int ExceptionListRan = 0;
|
||||||
public static void WAD(string[] args)
|
public static void WAD(string[] args)
|
||||||
{
|
{
|
||||||
if (args.Length < 3)
|
if (args.Length < 3)
|
||||||
|
@ -586,12 +587,22 @@ namespace Sharpii
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Console.WriteLine("An unknown error occured, please try again");
|
if (ex.Message == "Index was outside the bounds of the array.")
|
||||||
Console.WriteLine("");
|
{
|
||||||
Console.WriteLine("ERROR DETAILS: {0}", ex.Message);
|
Console.WriteLine("You need to have all the required .app files, a tmd file, a tik file, and a cert file to do this.");
|
||||||
Console.WriteLine("Error: SHARPII_NET_CORE_WAD_UNKNOWN_01");
|
Console.WriteLine("");
|
||||||
Environment.Exit(0x00003E82);
|
Console.WriteLine("Error: SHARPII_NET_CORE_NUSD_MISSING_FILES_01");
|
||||||
return;
|
ExceptionListRan = 1;
|
||||||
|
Environment.Exit(0x00003E9D);
|
||||||
|
}
|
||||||
|
if (ExceptionListRan == 0)
|
||||||
|
{
|
||||||
|
Console.WriteLine("An unknown error occured, please try again");
|
||||||
|
Console.WriteLine("");
|
||||||
|
Console.WriteLine("ERROR DETAILS: {0}", ex.Message);
|
||||||
|
Console.WriteLine("Error: SHARPII_NET_CORE_WAD_UNKNOWN_01");
|
||||||
|
Environment.Exit(0x00003E82);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue