Change-Id: I28a8bac83c2603a404e4c5fb47261856241f2563
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
+#define content_retip_if_fail(expr) do { \
+ if (!(expr)) { \
+ LOGE(FONT_COLOR_RED"[%ld] Invalid [%s]"FONT_COLOR_RESET, media_content_gettid(), #expr); \
+ return MEDIA_CONTENT_ERROR_INVALID_PARAMETER; \
+ } \
+ } while (0)
+
+#define content_retipm_if_fail(expr, fmt, arg...) do { \
+ if (!(expr)) { \
+ LOGE(FONT_COLOR_RED"[%ld] Cond[%s] value["fmt"]"FONT_COLOR_RESET, media_content_gettid(), #expr, ##arg); \
+ return MEDIA_CONTENT_ERROR_INVALID_PARAMETER; \
+ } \
+ } while (0)
+
#define content_warn(fmt, arg...) do { \
LOGW(FONT_COLOR_GREEN"[%ld]"fmt""FONT_COLOR_RESET, media_content_gettid(), ##arg); \
} while (0)
#define content_warn(fmt, arg...) do { \
LOGW(FONT_COLOR_GREEN"[%ld]"fmt""FONT_COLOR_RESET, media_content_gettid(), ##arg); \
} while (0)
+#define content_retip_if_fail(expr) do { \
+ if (!(expr)) { \
+ LOGE(FONT_COLOR_RED"[%ld] Invalid [%s]"FONT_COLOR_RESET, media_content_gettid(), #expr); \
+ return MEDIA_CONTENT_ERROR_INVALID_PARAMETER; \
+ } \
+ } while (0)
+
+#define content_retipm_if_fail(expr, fmt, arg...) do { \
+ if (!(expr)) { \
+ LOGE(FONT_COLOR_RED"[%ld] Cond[%s] value["fmt"]"FONT_COLOR_RESET, media_content_gettid(), #expr, ##arg); \
+ return MEDIA_CONTENT_ERROR_INVALID_PARAMETER; \
+ } \
+ } while (0)
+
#define content_warn(fmt, arg...) do { \
LOGW(FONT_COLOR_GREEN"[%ld]"fmt""FONT_COLOR_RESET, media_content_gettid(), ##arg); \
} while (0)
#define content_warn(fmt, arg...) do { \
LOGW(FONT_COLOR_GREEN"[%ld]"fmt""FONT_COLOR_RESET, media_content_gettid(), ##arg); \
} while (0)