28 lines
967 B
C#
28 lines
967 B
C#
using adas_core.Domain.Enums;
|
|
|
|
namespace adas_core.Application.Exceptions;
|
|
|
|
/// <summary>
|
|
/// Exception thrown when a user lacks authorization to perform an operation.
|
|
/// </summary>
|
|
/// <!-- aidoc:v1 sig=c33e8e4 -->
|
|
public class UnauthorizedException : Exception
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="UnauthorizedException"/> class.
|
|
/// </summary>
|
|
/// <param name="message">The error message associated with the exception.</param>
|
|
/// <!-- aidoc:v1 sig=0488051 body=4448e1d -->
|
|
public UnauthorizedException(HttpEnum.ErrorMessage message) : base(((int)message).ToString())
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="UnauthorizedException"/> class.
|
|
/// </summary>
|
|
/// <param name="message">The message that describes the error.</param>
|
|
/// <!-- aidoc:v1 sig=f0581f2 body=4448e1d -->
|
|
public UnauthorizedException(string message) : base(message)
|
|
{
|
|
}
|
|
} |