Пример #1
0
 public static void Raise(IOperationContext context, Guid menuId, DomainExceptionBase domainException)
 {
     Raise((OperationCode)context.OperationCode, context.CorrelationId, menuId, domainException);
 }
Пример #2
0
        public static void Raise(OperationCode operationCode, Guid correlationId, Guid menuId, DomainExceptionBase domainException)
        {
            var exception = new DomainRuleViolationException(
                (ExceptionCode)domainException.ExceptionCode,
                operationCode,
                correlationId,
                $"A domain exception has been raised in the menu '{menuId}'. {domainException.Message}",
                domainException
                );

            exception.Data["MenuId"] = menuId;
            throw exception;
        }