Dalamud/Dalamud/Plugin/Ipc/Exceptions/IpcLengthMismatchError.cs
2021-08-28 18:50:12 -04:00

19 lines
912 B
C#

namespace Dalamud.Plugin.Ipc.Exceptions
{
/// <summary>
/// This exception is thrown when an IPC method is invoked and the number of types does not match what was previously registered.
/// </summary>
public class IpcLengthMismatchError : IpcError
{
/// <summary>
/// Initializes a new instance of the <see cref="IpcLengthMismatchError"/> class.
/// </summary>
/// <param name="name">Name of the IPC method.</param>
/// <param name="requestedLength">The amount of types requested when checking out the IPC.</param>
/// <param name="actualLength">The amount of types registered by the IPC.</param>
public IpcLengthMismatchError(string name, int requestedLength, int actualLength)
: base($"IPC method {name} has a different number of types than was requested. {requestedLength} != {actualLength}")
{
}
}
}