mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-15 12:27:43 +01:00
err...
This commit is contained in:
parent
b5f1084f73
commit
9965dc313a
14 changed files with 381 additions and 406 deletions
|
|
@ -1,35 +0,0 @@
|
|||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Dalamud.Bootstrap.Windows
|
||||
{
|
||||
/// <summary>
|
||||
/// An exception that is thrown when there was an error while interacting with the process.
|
||||
/// </summary>
|
||||
internal sealed class ProcessException : Exception
|
||||
{
|
||||
public uint Pid { get; }
|
||||
|
||||
internal ProcessException() : base() { }
|
||||
|
||||
internal ProcessException(string message) : base(message) { }
|
||||
|
||||
internal ProcessException(string message, Exception innerException) : base(message, innerException) { }
|
||||
|
||||
internal ProcessException(string message, uint pid) : base(message) => Pid = pid;
|
||||
|
||||
internal ProcessException(string message, uint pid, Exception innerException) : base(message, innerException) => Pid = pid;
|
||||
|
||||
internal static void ThrowLastOsError(uint pid)
|
||||
{
|
||||
var inner = new Win32Exception();
|
||||
throw new ProcessException(inner.ToString(), pid, inner);
|
||||
}
|
||||
|
||||
internal static void ThrowLastOsError(string message)
|
||||
{
|
||||
var inner = new Win32Exception();
|
||||
throw new ProcessException(message, inner);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue