mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-01 05:13:40 +01:00
chore: Suppress expected load errors (#1593)
- Add new `PluginPreconditionFailedException` to track cases where a plugin could not be loaded due to a precondition not being met. - Make `BannedPluginException` inherit from this - Make `PluginPreconditionFailedException`s show as warnings in the log.
This commit is contained in:
parent
69096c440a
commit
01cde50a46
3 changed files with 27 additions and 13 deletions
|
|
@ -3,19 +3,14 @@ namespace Dalamud.Plugin.Internal.Exceptions;
|
|||
/// <summary>
|
||||
/// This represents a banned plugin that attempted an operation.
|
||||
/// </summary>
|
||||
internal class BannedPluginException : PluginException
|
||||
internal class BannedPluginException : PluginPreconditionFailedException
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BannedPluginException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="message">The message describing the invalid operation.</param>
|
||||
public BannedPluginException(string message)
|
||||
: base(message)
|
||||
{
|
||||
this.Message = message;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the message describing the invalid operation.
|
||||
/// </summary>
|
||||
public override string Message { get; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
namespace Dalamud.Plugin.Internal.Exceptions;
|
||||
|
||||
/// <summary>
|
||||
/// An exception to be thrown when policy blocks a plugin from loading.
|
||||
/// </summary>
|
||||
internal class PluginPreconditionFailedException : InvalidPluginOperationException
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PluginPreconditionFailedException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="message">The message to associate with this exception.</param>
|
||||
public PluginPreconditionFailedException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue