mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
Add error message box in Injector
This commit is contained in:
parent
4777bbd525
commit
5df18f8f30
2 changed files with 11 additions and 5 deletions
|
|
@ -14,10 +14,10 @@
|
|||
</PropertyGroup>
|
||||
<PropertyGroup Label="Feature">
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<AssemblyVersion>4.1.0.3</AssemblyVersion>
|
||||
<FileVersion>4.1.0.3</FileVersion>
|
||||
<AssemblyVersion>4.1.0.6</AssemblyVersion>
|
||||
<FileVersion>4.1.0.6</FileVersion>
|
||||
<Description>XIVLauncher addon injection</Description>
|
||||
<Version>4.1.0.3</Version>
|
||||
<Version>4.1.0.6</Version>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<DocumentationFile></DocumentationFile>
|
||||
|
|
@ -29,4 +29,7 @@
|
|||
<ItemGroup>
|
||||
<ProjectReference Include="..\Dalamud\Dalamud.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using System.Diagnostics;
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Dalamud.DiscordBot;
|
||||
using Dalamud.Game.Chat;
|
||||
using EasyHook;
|
||||
|
|
@ -15,8 +16,10 @@ namespace Dalamud.Injector {
|
|||
AppDomain.CurrentDomain.UnhandledException += delegate(object sender, UnhandledExceptionEventArgs eventArgs)
|
||||
{
|
||||
File.WriteAllText("InjectorException.txt", eventArgs.ExceptionObject.ToString());
|
||||
|
||||
Process.GetCurrentProcess().Kill();
|
||||
|
||||
MessageBox.Show("Failed to inject the XIVLauncher in-game addon. Please report this error:\n\n" + eventArgs.ExceptionObject, "XIVLauncher Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
|
||||
Environment.Exit(0);
|
||||
};
|
||||
|
||||
var pid = int.Parse(args[0]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue