- Add [Serializable] attribute to all custom exceptions - Add protected constructors for serialization support - Add XML documentation comments - Update SwissQrCodeNotFoundException message format
35 lines
1.2 KiB
C#
35 lines
1.2 KiB
C#
namespace DocumentOperator.Domain.Common.Exceptions;
|
|
|
|
/// <summary>
|
|
/// Exception thrown when PDF processing operations fail.
|
|
/// Maps to HTTP 500 Internal Server Error or 422 Unprocessable Entity in the API layer.
|
|
/// </summary>
|
|
[Obsolete("This exception is deprecated. Use more specific exceptions for PDF processing errors.")]
|
|
public class PdfProcessingException : DomainException
|
|
{
|
|
public string Operation { get; }
|
|
|
|
public PdfProcessingException(string operation, string message)
|
|
: base($"PDF processing failed during '{operation}': {message}", "PDF_PROCESSING_ERROR")
|
|
{
|
|
Operation = operation;
|
|
}
|
|
|
|
public PdfProcessingException(string operation, string message, Exception innerException)
|
|
: base($"PDF processing failed during '{operation}': {message}", "PDF_PROCESSING_ERROR", innerException)
|
|
{
|
|
Operation = operation;
|
|
}
|
|
|
|
public PdfProcessingException(string message)
|
|
: base(message, "PDF_PROCESSING_ERROR")
|
|
{
|
|
Operation = "Unknown";
|
|
}
|
|
|
|
public PdfProcessingException(string message, Exception innerException)
|
|
: base(message, "PDF_PROCESSING_ERROR", innerException)
|
|
{
|
|
Operation = "Unknown";
|
|
}
|
|
} |