Added a new constructor to BadRequestException that accepts both a message and an inner exception, enabling improved exception chaining and more detailed error reporting.
32 lines
1.1 KiB
C#
32 lines
1.1 KiB
C#
namespace DigitalData.Core.Exceptions;
|
|
|
|
/// <summary>
|
|
/// Represents an exception that is thrown when a bad request is encountered.
|
|
/// </summary>
|
|
public class BadRequestException : Exception
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="BadRequestException"/> class.
|
|
/// </summary>
|
|
public BadRequestException()
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="BadRequestException"/> class with a specified error message.
|
|
/// </summary>
|
|
/// <param name="message">The message that describes the error.</param>
|
|
public BadRequestException(string? message) : base(message)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="BadRequestException"/> class with a specified error message and inner exception.
|
|
/// </summary>
|
|
/// <param name="message">The message that describes the error.</param>
|
|
/// <param name="innerException">The exception that caused the current exception.</param>
|
|
public BadRequestException(string? message, Exception? innerException) : base(message, innerException)
|
|
{
|
|
}
|
|
}
|