12345678910111213141516171819202122232425262728293031323334 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace Bowin.Common.ServiceToken.ApiIdentity
- {
- /// <summary>
- /// Code定义:
- /// 0 - 访问成功;
- /// -99 - 通用异常,具体参考异常消息提示;
- /// -1 - 访问令牌错误;
- /// -2 - 未授权操作;
- /// </summary>
- public class ServiceException : Exception
- {
- public int Code { get; set; } = -1;
- public ServiceException() : base()
- {
- }
- public ServiceException(int code) : base()
- {
- Code = code;
- }
- public ServiceException(string message) : base(message)
- {
- }
- public ServiceException(int code, string message) : base(message)
- {
- Code = code;
- }
- }
- }
|