mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-31 21:03:43 +01:00
Magic the magic happen
This commit is contained in:
parent
84769ae5b7
commit
658eedca37
188 changed files with 10329 additions and 3549 deletions
|
|
@ -0,0 +1,26 @@
|
|||
namespace Dalamud.Plugin.Internal.Exceptions
|
||||
{
|
||||
/// <summary>
|
||||
/// This exception that is thrown when a plugin is instructed to load while another plugin with the same
|
||||
/// assembly name is already present and loaded.
|
||||
/// </summary>
|
||||
internal class DuplicatePluginException : PluginException
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DuplicatePluginException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="assemblyName">Name of the conflicting assembly.</param>
|
||||
public DuplicatePluginException(string assemblyName)
|
||||
{
|
||||
this.AssemblyName = assemblyName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the conflicting assembly.
|
||||
/// </summary>
|
||||
public string AssemblyName { get; init; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string Message => $"A plugin with the same assembly name of {this.AssemblyName} is already loaded";
|
||||
}
|
||||
}
|
||||
25
Dalamud/Plugin/Internal/Exceptions/InvalidPluginException.cs
Normal file
25
Dalamud/Plugin/Internal/Exceptions/InvalidPluginException.cs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Dalamud.Plugin.Internal.Exceptions
|
||||
{
|
||||
/// <summary>
|
||||
/// This exception represents a file that does not implement IDalamudPlugin.
|
||||
/// </summary>
|
||||
internal class InvalidPluginException : PluginException
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InvalidPluginException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="dllFile">The invalid file.</param>
|
||||
public InvalidPluginException(FileInfo dllFile)
|
||||
{
|
||||
this.DllFile = dllFile;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the invalid file.
|
||||
/// </summary>
|
||||
public FileInfo DllFile { get; init; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
|
||||
namespace Dalamud.Plugin.Internal.Exceptions
|
||||
{
|
||||
/// <summary>
|
||||
/// This represents an invalid plugin operation.
|
||||
/// </summary>
|
||||
internal class InvalidPluginOperationException : PluginException
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InvalidPluginOperationException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="message">The message describing the invalid operation.</param>
|
||||
public InvalidPluginOperationException(string message)
|
||||
{
|
||||
this.Message = message;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the message describing the invalid operation.
|
||||
/// </summary>
|
||||
public override string Message { get; }
|
||||
}
|
||||
}
|
||||
11
Dalamud/Plugin/Internal/Exceptions/PluginException.cs
Normal file
11
Dalamud/Plugin/Internal/Exceptions/PluginException.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
using System;
|
||||
|
||||
namespace Dalamud.Plugin.Internal.Exceptions
|
||||
{
|
||||
/// <summary>
|
||||
/// This represents the base Dalamud plugin exception.
|
||||
/// </summary>
|
||||
internal abstract class PluginException : Exception
|
||||
{
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue