mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.5 KiB
49 lines
1.5 KiB
// ==========================================================================
|
|
// Squidex Headless CMS
|
|
// ==========================================================================
|
|
// Copyright (c) Squidex UG (haftungsbeschraenkt)
|
|
// All rights reserved. Licensed under the MIT license.
|
|
// ==========================================================================
|
|
|
|
using Squidex.Infrastructure.Json;
|
|
|
|
namespace Squidex.Infrastructure
|
|
{
|
|
public static class ThrowHelper
|
|
{
|
|
public static void ArgumentException(string message, string? paramName)
|
|
{
|
|
throw new ArgumentException(message, paramName);
|
|
}
|
|
|
|
public static void ArgumentNullException(string? paramName)
|
|
{
|
|
throw new ArgumentNullException(paramName);
|
|
}
|
|
|
|
public static void KeyNotFoundException(string? message = null)
|
|
{
|
|
throw new KeyNotFoundException(message);
|
|
}
|
|
|
|
public static void InvalidOperationException(string? message = null)
|
|
{
|
|
throw new InvalidOperationException(message);
|
|
}
|
|
|
|
public static void InvalidCastException(string? message = null)
|
|
{
|
|
throw new InvalidCastException(message);
|
|
}
|
|
|
|
public static void JsonException(string? message = null, Exception? ex = null)
|
|
{
|
|
throw new JsonException(message, ex);
|
|
}
|
|
|
|
public static void NotSupportedException(string? message = null)
|
|
{
|
|
throw new NotSupportedException(message);
|
|
}
|
|
}
|
|
}
|
|
|