15 #define CALL_STATUS_FNC(function, ...) \
16 if (!actual) THROW_IE_EXCEPTION << "Wrapper used in the CALL_STATUS_FNC was not initialized."; \
18 auto res = actual->function(__VA_ARGS__, &resp); \
19 if (res != OK) InferenceEngine::details::extract_exception(res, resp.msg);
21 #define CALL_STATUS_FNC_NO_ARGS(function) \
22 if (!actual) THROW_IE_EXCEPTION << "Wrapper used in the CALL_STATUS_FNC_NO_ARGS was not initialized."; \
24 auto res = actual->function(&resp); \
25 if (res != OK) InferenceEngine::details::extract_exception(res, resp.msg);
27 #define CALL_FNC_NO_ARGS(function) \
28 if (!actual) THROW_IE_EXCEPTION << "Wrapper used in the CALL_FNC_NO_ARGS was not initialized."; \
30 auto result = actual->function(&resp); \
31 if (resp.msg[0] != '\0') { \
32 THROW_IE_EXCEPTION << resp.msg; \
39 inline void extract_exception(
StatusCode status,
const char* msg) {
42 throw NotImplemented(msg);
43 case NETWORK_NOT_LOADED:
44 throw NetworkNotLoaded(msg);
45 case PARAMETER_MISMATCH:
46 throw ParameterMismatch(msg);
50 throw OutOfBounds(msg);
52 throw Unexpected(msg);
54 throw RequestBusy(msg);
55 case RESULT_NOT_READY:
56 throw ResultNotReady(msg);
58 throw NotAllocated(msg);
59 case INFER_NOT_STARTED:
60 throw InferNotStarted(msg);
61 case NETWORK_NOT_READ:
62 throw NetworkNotRead(msg);
64 throw InferCancelled(msg);
This is a header file with common inference engine definitions.
A header file for the main Inference Engine exception.
#define THROW_IE_EXCEPTION
A macro used to throw general exception with a description.
Definition: ie_exception.hpp:25
Inference Engine C++ API.
Definition: cldnn_config.hpp:15
StatusCode
This enum contains codes for all possible return values of the interface functions.
Definition: ie_common.h:224