using System.Net; namespace adas_core.Domain.Exceptions; /// /// Represents an exception that aggregates one or more errors related to business logic or domain rule violations. /// /// public class BusinessException : AggregateException { /// /// Initializes a new instance of the class with the supplied and message, forwarding their combined textual representation to the base exception constructor. represents errors raised by business logic that are associated with an HTTP status. /// /// The that identifies the nature of the business error. /// The descriptive message that provides additional context for the error. /// public BusinessException(HttpStatusCode status, string message) : base($"{status}: {message}") { } /// /// Initializes a new instance of the class, which represents errors in business logic, by passing the specified error message and inner to the base class constructor. /// /// The error message that describes the reason for the exception. /// The inner that is the cause of the current exception, or if no inner exception is specified. /// public BusinessException(string message, Exception exception) : base(message, exception) { } }