Files
DocumentService/DocumentService.Domain/Common/Exceptions/DomainException.cs
TekH 207c778f3a Refactor: Rename DocumentOperator to DocumentService
Updated project and solution files to rename and restructure
`DocumentOperator` to `DocumentService`. Modified project
references in `DocumentService.API.csproj`, `DocumentService.Application.csproj`,
and `DocumentService.Infrastructure.csproj` to reflect the new
naming convention. Updated `DocumentService.sln` to remove
old project references, add new ones, and adjust configuration
and nested project mappings accordingly. This change aligns
the project structure with the new naming convention.
2026-08-30 21:33:25 +02:00

26 lines
783 B
C#

namespace DocumentService.Domain.Common.Exceptions;
/// <summary>
/// Base exception for all domain-related exceptions.
/// Caught by the Exception Handling Middleware in the API layer.
/// </summary>
[Obsolete("This exception is deprecated. Use more specific exceptions for domain errors.")]
public abstract class DomainException : Exception
{
/// <summary>
/// Error code for categorization and logging.
/// </summary>
public string ErrorCode { get; }
protected DomainException(string message, string errorCode)
: base(message)
{
ErrorCode = errorCode;
}
protected DomainException(string message, string errorCode, Exception innerException)
: base(message, innerException)
{
ErrorCode = errorCode;
}
}