/
softailor
/
gridient
Обзор
Документация
Войти
/
softailor
/
gridient
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
backend/Gridient.Core/Exceptions/ListsExceptions.cs
24 строки
1 KB
Jenkins
Auto add
18 фев 2026, 10:19
18 фев 2026, 10:19
1e6c4f8
Код
Авторство
О чём код?
namespace Gridient.Core.Exceptions { public class ListsException : Exception { protected ListsException(string message) : base(message) { } protected ListsException(string message, Exception innerException) : base(message, innerException) { } public static ListsException Error(Exception ex) => new(ex.ToString(), ex); public static ListsException Error(string message) => new(message); public static ListsException CurrentUserNotFound => new("Не удалось определить текущего пользователя"); public static ListsException AccessDenied => new("Доступ запрещен"); public static ListsException EntityNotFound(int entityId) => new($"EntityId '{entityId}' not found"); public static ListsException FieldNotFound(string fieldName) => new($"Field '{fieldName}' not found"); public static ListsException RequiredField(string field) => new($"Поле '{field}' обязательное"); } }