NEMeetingKit V4.8.0
载入中...
搜索中...
未找到
kit_define_exception.h
浏览该文件的文档.
1// Copyright (c) 2022 NetEase, Inc. All rights reserved.
2// Use of this source code is governed by a MIT license that can be
3// found in the LICENSE file.
4
13#ifndef NEM_SDK_INTERFACE_DEFINE_EXCEPTION_DEFINE_H_
14#define NEM_SDK_INTERFACE_DEFINE_EXCEPTION_DEFINE_H_
15
16#include "build_config.h"
18
20
32
37public:
42 : exception_code_(NEExceptionCode::kUnknown)
43 , exception_message_("") {}
44
50 NEException(NEExceptionCode error, const std::string& message)
51 : exception_code_(error)
52 , exception_message_(message) {}
53
58 NEExceptionCode ExceptionCode() const { return exception_code_; }
59
65 void ExceptionCode(NEExceptionCode code) { exception_code_ = code; }
66
71 std::string ExceptionMessage() const { return exception_message_; }
72
78 void ExceptionMessage(const std::string& msg) { exception_message_ = msg; }
79
80private:
81 NEExceptionCode exception_code_;
82 std::string exception_message_;
83};
84
86
87#endif // NEM_SDK_INTERFACE_DEFINE_EXCEPTION_DEFINE_H_
编译配置头文件
#define NNEM_SDK_INTERFACE_BEGIN_DECLS
定义 build_config.h:16
#define NNEM_SDK_INTERFACE_END_DECLS
定义 build_config.h:17
异常信息
定义 kit_define_exception.h:36
std::string ExceptionMessage() const
获取异常描述
定义 kit_define_exception.h:71
NEExceptionCode ExceptionCode() const
获取异常码
定义 kit_define_exception.h:58
NEException()
构造函数
定义 kit_define_exception.h:41
void ExceptionCode(NEExceptionCode code)
设置异常码
定义 kit_define_exception.h:65
void ExceptionMessage(const std::string &msg)
设置异常描述
定义 kit_define_exception.h:78
NEException(NEExceptionCode error, const std::string &message)
构造函数
定义 kit_define_exception.h:50
公共对象
定义 kit_define_public.h:24
NEExceptionCode
异常码
定义 kit_define_exception.h:24
@ kAppDisconnect
应用层断开连接
定义 kit_define_exception.h:27
@ kKeepAliveTimeout
心跳超时
定义 kit_define_exception.h:28
@ kEnd
定义 kit_define_exception.h:30
@ kUISDKDisconnect
UI SDK 断开连接
定义 kit_define_exception.h:26
@ kUnknown
未知错误,或者不方便告诉你
定义 kit_define_exception.h:29
@ kBegin
定义 kit_define_exception.h:25
库导入导出定义头文件
#define NEM_SDK_INTERFACE_EXPORT
定义 kit_interface_export.h:35