NEMeeting SDK
exception_define.h
浏览该文件的文档.
1 
9 #ifndef NEM_SDK_INTERFACE_DEFINE_EXCEPTION_DEFINE_H_
10 #define NEM_SDK_INTERFACE_DEFINE_EXCEPTION_DEFINE_H_
11 
13 #include "build_config.h"
14 
15 #include "exception.h"
16 
18 
23 {
24 public:
29  exception_code_(NEExceptionCode::kUnknown), exception_message_("") {
30  }
31 
37  NEException(NEExceptionCode error, const std::string& message) :
38  exception_code_(error), exception_message_(message) {
39  }
40 
46  return exception_code_;
47  }
48 
55  exception_code_ = code;
56  }
57 
62  std::string ExceptionMessage() const {
63  return exception_message_;
64  }
65 
71  void ExceptionMessage(const std::string& msg) {
72  exception_message_ = msg;
73  }
74 private:
75  NEExceptionCode exception_code_;
76  std::string exception_message_;
77 };
78 
80 
81 #endif //NEM_SDK_INTERFACE_DEFINE_EXCEPTION_DEFINE_H_
编译配置头文件
#define NNEM_SDK_INTERFACE_BEGIN_DECLS
Definition: build_config.h:12
#define NNEM_SDK_INTERFACE_END_DECLS
Definition: build_config.h:13
NEException(NEExceptionCode error, const std::string &message)
构造函数
std::string ExceptionMessage() const
获取异常描述
NEExceptionCode ExceptionCode() const
获取异常码
void ExceptionCode(NEExceptionCode code)
设置异常码
void ExceptionMessage(const std::string &msg)
设置异常描述
异常码头文件
NEExceptionCode
异常码
Definition: exception.h:20
库导入导出定义头文件
#define NEM_SDK_INTERFACE_EXPORT