-* This macro is to protect exception log messages which needs to keep security, with a tag and sets the last result.
-* It allows display of exception log messages if compiled with "_SECURE_LOG" definition.
-* Otherwise, it will be removed in the compile time.
-* This system log macro is for the platform modules.
-*
-* @since 2.1
-*
-* @param[in] NID The Tizen namespace ID
-* @param[in] tag The user defined tag
-* @param[in] r The last result to set
-* @param[in] ... The message to display
-*
-* The following example demonstrates how to use the SysSecureLogExceptionTag macro.
-*
-* @code
-* bool
-* MyEngine::Init(int value)
-* {
-* SysSecureLogExceptionTag(NID, "MyTag", E_INVALID_ARG, "User ID : 'JoneDoe' mismatch.");
-*
-* return true;
-* }
-* @endcode
-* @hideinitializer
-*/
-#define SysSecureLogExceptionTag(NID, tag, r, ...)
+ * This macro is to protect exception log messages which needs to keep security, with a tag and sets the last result.
+ * It allows display of exception log messages if compiled with "_SECURE_LOG" definition.
+ * Otherwise, log printing functionality will be removed in the compile time.
+ * This system log macro is for the platform modules.
+ *
+ * @since 2.1
+ *
+ * @param[in] NID The Tizen namespace ID
+ * @param[in] tag The user defined tag
+ * @param[in] r The last result to set
+ * @param[in] ... The message to display
+ *
+ * The following example demonstrates how to use the SysSecureLogExceptionTag macro.
+ *
+ * @code
+ * bool
+ * MyEngine::Init(int value)
+ * {
+ * SysSecureLogExceptionTag(NID, "MyTag", E_INVALID_ARG, "User ID : 'JoneDoe' mismatch.");
+ *
+ * return true;
+ * }
+ * @endcode
+ * @hideinitializer
+ */
+#define SysSecureLogExceptionTag(NID, tag, r, ...) SetLastResult(r);
+
+#endif
+
+/**
+ * This macro allows display of informative log message with a tag, when the condition is @c false.
+ * It allows display of exception log messages if compiled with "_SECURE_LOG" definition.
+ * Otherwise, log printing functionality will be removed in the compile time.
+ * This system log macro is for the platform modules.
+ *
+ * @since 2.1
+ *
+ * @param[in] NID The Tizen namespace
+ * @param[in] condition The condition that is expected to be true
+ * @param[in] ... The message to display
+ *
+ * The following example demonstrates how to use the SysSecureTry macro.
+ *
+ * @code
+ * bool
+ * MyEngine::Init(int value)
+ * {
+ * //...
+ *
+ * SysSecureTryLog(NID, condition, "Password mismatch : %s", password );
+ *
+ * //...
+ * }
+ * @endcode
+ * @hideinitializer
+ */
+#define SysSecureTryLog(NID, condition, ...) \
+ do \
+ { \
+ if (unlikely(!(condition))) { \
+ SysSecureLog(NID, __VA_ARGS__); \
+ } \
+ } while (0);
+
+/**
+ * This macro allows display of informative log message, when the condition is @c false.
+ * Executes statements and goes to label.
+ * It allows display of exception log messages if compiled with "_SECURE_LOG" definition.
+ * Otherwise, log printing functionality will be removed in the compile time.
+ * This system log macro is for the platform modules.
+ *
+ * @since 2.1
+ *
+ * @param[in] NID The Tizen namespace
+ * @param[in] condition The condition that is expected to be true
+ * @param[in] expr Expressions that are evaluated before going to CATCH label
+ * @param[in] ... The message to display
+ * @hideinitializer
+ */
+#define SysSecureTryLogCatch(NID, condition, expr, ...) \
+ do \
+ { \
+ if (unlikely(!(condition))) { \
+ SysSecureLog(NID, __VA_ARGS__); \
+ expr; \
+ goto CATCH; \
+ } \
+ } while (0);
+
+/**
+ * This macro allows display of informative log message and returns returnValue, when the condition is @c false.
+ * It allows display of exception log messages if compiled with "_SECURE_LOG" definition.
+ * Otherwise, log printing functionality will be removed in the compile time.
+ * This system log macro is for the platform modules.
+ *
+ * @since 2.1
+ *
+ * @param[in] NID The Tizen namespace
+ * @param[in] condition The condition that is expected to be true
+ * @param[in] returnValue The value to return when the condition is @c false
+ * @param[in] ... The message to display
+ * @hideinitializer
+ */
+#define SysSecureTryLogReturn(NID, condition, returnValue, ...) \
+ do \
+ { \
+ if (unlikely(!(condition))) { \
+ SysSecureLog(NID, __VA_ARGS__); \
+ return returnValue; \
+ } \
+ } while (0);