+/**
+ * Macro to verify the validity of cbor operation.
+ */
+#define VERIFY_CBOR_SUCCESS(log_tag, err, log_message) \
+ if ((CborNoError != (err)) && (CborErrorOutOfMemory != (err))) \
+ { \
+ if ((log_tag) && (log_message)) \
+ { \
+ OIC_LOG_V(ERROR, (log_tag), "%s with cbor error: \'%s\'.", \
+ (log_message), (cbor_error_string(err))); \
+ } \
+ goto exit; \
+ } \
+
+#define VERIFY_PARAM_NON_NULL(log_tag, err, log_message) \
+ if (NULL == (err)) \
+ { \
+ OIC_LOG_V(FATAL, (log_tag), "%s", (log_message)); \
+ goto exit;\
+ } \
+
+