add DuplicateKeyException
This commit is contained in:
parent
93f8790653
commit
cf72623dbc
@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace MBS.Core.Collections;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The exception thrown when an item with the same key has already been added.
|
||||||
|
/// </summary>
|
||||||
|
public class DuplicateKeyException : ArgumentException
|
||||||
|
{
|
||||||
|
|
||||||
|
public DuplicateKeyException() : base("An item with the same key has already been added.")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
public DuplicateKeyException(Exception? innerException) : base("An item with the same key has already been added.", innerException)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public DuplicateKeyException(string? message) : base(message) { }
|
||||||
|
public DuplicateKeyException(string? message, Exception? innerException) : base(message, innerException) { }
|
||||||
|
public DuplicateKeyException(string? message, string? paramName) : base(message, paramName) { }
|
||||||
|
public DuplicateKeyException(string? message, string? paramName, Exception? innerException) : base(message, paramName, innerException) { }
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user