mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
chore: remove error messagebox in Dalamud.Injector, the program that runs it should show an error instead
This commit is contained in:
parent
62d34f326a
commit
bf72ad589d
1 changed files with 2 additions and 17 deletions
|
|
@ -143,7 +143,6 @@ namespace Dalamud.Injector
|
|||
Console.WriteLine("Command line error: {0}", clex.Message);
|
||||
Console.WriteLine();
|
||||
ProcessHelpCommand(args);
|
||||
Environment.Exit(-1);
|
||||
}
|
||||
else if (Log.Logger == null)
|
||||
{
|
||||
|
|
@ -151,27 +150,13 @@ namespace Dalamud.Injector
|
|||
}
|
||||
else if (exObj is Exception ex)
|
||||
{
|
||||
Log.Error(ex, "A fatal error has occurred.");
|
||||
Log.Error(ex, "A fatal error has occurred");
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error($"A fatal error has occurred: {eventArgs.ExceptionObject}");
|
||||
Log.Error("A fatal error has occurred: {Exception}", eventArgs.ExceptionObject.ToString());
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
var caption = "Debug Error";
|
||||
var message =
|
||||
$"Couldn't inject.\nMake sure that Dalamud was not injected into your target process " +
|
||||
$"as a release build before and that the target process can be accessed with VM_WRITE permissions.\n\n" +
|
||||
$"{eventArgs.ExceptionObject}";
|
||||
#else
|
||||
var caption = "XIVLauncher Error";
|
||||
var message =
|
||||
"Failed to inject the XIVLauncher in-game addon.\nPlease try restarting your game and your PC.\n" +
|
||||
"If this keeps happening, please report this error.";
|
||||
#endif
|
||||
_ = MessageBoxW(IntPtr.Zero, message, caption, MessageBoxType.IconError | MessageBoxType.Ok);
|
||||
|
||||
Environment.Exit(-1);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue