mirror of
https://github.com/chylex/.NET-Community-Toolkit.git
synced 2025-04-10 11:15:45 +02:00
Added ArrayTypeMismatchException throw APIs
This commit is contained in:
parent
4e45819786
commit
5d578f6209
@ -19,6 +19,29 @@ namespace Microsoft.Toolkit.Diagnostics
|
||||
/// </summary>
|
||||
public static partial class ThrowHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// Throws a new <see cref="ArrayTypeMismatchException"/>.
|
||||
/// </summary>
|
||||
/// <param name="message">The message to include in the exception.</param>
|
||||
/// <exception cref="ArrayTypeMismatchException">Thrown with the specified parameter.</exception>
|
||||
[DoesNotReturn]
|
||||
public static void ThrowArrayTypeMismatchException(string message)
|
||||
{
|
||||
throw new ArrayTypeMismatchException(message);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Throws a new <see cref="ArrayTypeMismatchException"/>.
|
||||
/// </summary>
|
||||
/// <param name="message">The message to include in the exception.</param>
|
||||
/// <param name="innerException">The inner <see cref="Exception"/> to include.</param>
|
||||
/// <exception cref="ArrayTypeMismatchException">Thrown with the specified parameters.</exception>
|
||||
[DoesNotReturn]
|
||||
public static void ThrowArrayTypeMismatchException(string message, Exception innerException)
|
||||
{
|
||||
throw new ArrayTypeMismatchException(message, innerException);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Throws a new <see cref="ArgumentException"/>.
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user