12 #define CALL_STATUS_FNC(function, ...) \
14 auto res = actual->function(__VA_ARGS__, &resp); \
15 if (res != OK) InferenceEngine::details::extract_exception(res, resp.msg);
17 #define CALL_STATUS_FNC_NO_ARGS(function) \
19 auto res = actual->function(&resp); \
20 if (res != OK) InferenceEngine::details::extract_exception(res, resp.msg);
22 #define CALL_FNC(function, ...) \
24 auto result = actual->function(__VA_ARGS__, &resp); \
25 if (resp.msg[0] != '\0') { \
26 THROW_IE_EXCEPTION << resp.msg; \
30 #define CALL_FNC_REF(function, ...) \
32 auto& result = actual->function(__VA_ARGS__, &resp); \
33 if (resp.msg[0] != '\0') { \
34 THROW_IE_EXCEPTION << resp.msg; \
38 #define CALL_FNC_NO_ARGS(function) \
40 auto result = actual->function(&resp); \
41 if (resp.msg[0] != '\0') { \
42 THROW_IE_EXCEPTION << resp.msg; \
46 #define CALL_FNC_NO_ARGS_REF(function) \
48 auto& result = actual->function(&resp); \
49 if (resp.msg[0] != '\0') { \
50 THROW_IE_EXCEPTION << resp.msg; \
57 inline void extract_exception(
StatusCode status,
char* msg) {
60 throw NotImplemented(msg);
61 case NETWORK_NOT_LOADED:
62 throw NetworkNotLoaded(msg);
63 case PARAMETER_MISMATCH:
64 throw ParameterMismatch(msg);
68 throw OutOfBounds(msg);
70 throw Unexpected(msg);
72 throw RequestBusy(msg);
73 case RESULT_NOT_READY:
74 throw ResultNotReady(msg);
76 throw NotAllocated(msg);
77 case INFER_NOT_STARTED:
78 throw InferNotStarted(msg);
79 case NETWORK_NOT_READ:
#define THROW_IE_EXCEPTION
A macro used to throw the exception with a notable description.
Definition: ie_exception.hpp:24
Inference Engine API.
Definition: ie_argmax_layer.hpp:11
StatusCode
This enum contains codes for all possible return values of the interface functions.
Definition: ie_common.h:212
This class represents StatusCode::NETWORK_NOT_READ exception.
Definition: ie_common.h:299
This is a header file with common inference engine definitions.