You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
647 B
24 lines
647 B
using Apewer.Web;
|
|
using System;
|
|
|
|
namespace Apewer
|
|
{
|
|
|
|
/// <summary>表示被禁止访问的错误。</summary>
|
|
public sealed class ForbiddenException : Exception, IApiException
|
|
{
|
|
|
|
const string DefaultMessage = "禁止访问。";
|
|
|
|
/// <summary>表示禁止访问的状态。</summary>
|
|
public string Status { get => "Forbidden"; }
|
|
|
|
/// <summary></summary>
|
|
public ForbiddenException(string message = DefaultMessage) : base(message.IsEmpty() ? DefaultMessage : message) { }
|
|
|
|
/// <summary></summary>
|
|
public override string ToString() => $"<ForbiddenException> {Message}";
|
|
|
|
}
|
|
|
|
}
|