19 lines
394 B
C
19 lines
394 B
C
|
#ifndef __ERRORCODE_H__
|
||
|
#define __ERRORCODE_H__
|
||
|
|
||
|
#include <system_error>
|
||
|
|
||
|
enum class ErrorCode {
|
||
|
Success = 0,
|
||
|
NoDevices = -1, // 枚举不到UVC设备
|
||
|
};
|
||
|
|
||
|
namespace std {
|
||
|
template <>
|
||
|
struct is_error_code_enum<ErrorCode> : true_type {};
|
||
|
} // namespace std
|
||
|
|
||
|
class ErrorCategory : public std::error_category {};
|
||
|
std::error_code makeErrorCode(ErrorCode code);
|
||
|
|
||
|
#endif // __ERRORCODE_H__
|