using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Text; using System.Threading.Tasks; namespace cylsg.Authorization { /// /// 作为ezcore 的扩充 /// public class EZCoreException : Exception { public EZCoreException(string message, HttpStatusCode? sCode = null) : base(message) { if (sCode != null) StatusCode = sCode; } public EZCoreException(HttpStatusCode? sCode = null) { if (sCode != null) StatusCode = sCode; } public EZCoreException(string message, Exception innerException, HttpStatusCode? sCode = null) : base(message, innerException) { if (sCode != null) StatusCode = sCode; } public HttpStatusCode? StatusCode { get; set; } = HttpStatusCode.OK; } }