Show / Hide Table of Contents

    ApiException 类

    在 API 调用发生错误时引发的异常。

    继承
    System.Object
    System.Exception
    ApiException
    实现
    System.Runtime.Serialization.ISerializable
    继承成员
    System.Exception.GetBaseException()
    System.Exception.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)
    System.Exception.GetType()
    System.Exception.ToString()
    System.Exception.Data
    System.Exception.HelpLink
    System.Exception.HResult
    System.Exception.InnerException
    System.Exception.Message
    System.Exception.Source
    System.Exception.StackTrace
    System.Exception.TargetSite
    System.Exception.SerializeObjectState
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    命名空间: HuajiTech.CoolQ
    程序集: HuajiTech.CoolQ.Abstractions.dll
    语法
    [Serializable]
    public class ApiException : Exception, ISerializable

    构造函数

    | 改善此文档 查看源代码

    ApiException()

    声明
    public ApiException()
    | 改善此文档 查看源代码

    ApiException(SerializationInfo, StreamingContext)

    声明
    protected ApiException(SerializationInfo info, StreamingContext context)
    参数
    类型 名称 描述
    System.Runtime.Serialization.SerializationInfo info
    System.Runtime.Serialization.StreamingContext context
    | 改善此文档 查看源代码

    ApiException(String)

    声明
    public ApiException(string message)
    参数
    类型 名称 描述
    System.String message
    | 改善此文档 查看源代码

    ApiException(String, Exception)

    声明
    public ApiException(string message, Exception innerException)
    参数
    类型 名称 描述
    System.String message
    System.Exception innerException
    | 改善此文档 查看源代码

    ApiException(String, Int32)

    声明
    public ApiException(string message, int errorCode)
    参数
    类型 名称 描述
    System.String message
    System.Int32 errorCode

    属性

    | 改善此文档 查看源代码

    ErrorCode

    获取当前 ApiException 实例的错误代码。 如果没有错误代码,则为 null。

    声明
    public int? ErrorCode { get; }
    属性值
    类型 描述
    System.Nullable<System.Int32>

    实现

    System.Runtime.Serialization.ISerializable

    扩展方法

    LoggingExtensions.LogAsWarning<TException>(TException, ILogger)
    LoggingExtensions.LogAsWarning<TException>(TException)
    LoggingExtensions.LogAsError<TException>(TException, ILogger)
    LoggingExtensions.LogAsError<TException>(TException)
    LoggingExtensions.SendTo(Exception, ISendee, String, Int32)
    • 改善此文档
    • 查看源代码
    Back to top 本文档使用 CC BY-NC-SA 4.0 进行许可。