using System;
using System.Runtime.Serialization;
using Abp.Logging;
namespace Abp.Authorization
{
///
/// This exception is thrown on an unauthorized request.
///
[Serializable]
public class AbpAuthorizationException : AbpException, IHasLogSeverity
{
///
/// Severity of the exception.
/// Default: Warn.
///
public LogSeverity Severity { get; set; }
///
/// Creates a new object.
///
public AbpAuthorizationException()
{
Severity = LogSeverity.Warn;
}
///
/// Creates a new object.
///
public AbpAuthorizationException(SerializationInfo serializationInfo, StreamingContext context)
: base(serializationInfo, context)
{
}
///
/// Creates a new object.
///
/// Exception message
public AbpAuthorizationException(string message)
: base(message)
{
Severity = LogSeverity.Warn;
}
///
/// Creates a new object.
///
/// Exception message
/// Inner exception
public AbpAuthorizationException(string message, Exception innerException)
: base(message, innerException)
{
Severity = LogSeverity.Warn;
}
}
}