• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

shared_fooの不要ディレクトリ削除前のもの


Commit MetaInfo

Revisionfdead336ab2ad9d3573e26fe9b348e376f8868bf (tree)
Time2018-02-19 23:28:52
Authortakemasa <suikan@user...>
Commitertakemasa

Log Message

Added MURASAKI_PRINT_ERROR

Change Summary

Incremental Difference

--- a/stm32_development/murasaki/murasaki/murasaki_assert.hpp
+++ b/stm32_development/murasaki/murasaki/murasaki_assert.hpp
@@ -14,6 +14,7 @@
1414 #include "debug.hpp"
1515
1616 #define MURASAKI_ASSERT_MSG "!! Assertion failure in function %s(), at line %d of file %s !!\n\r"
17+#define MURASAKI_ERROR_MSG "Error in function %s(), at line %d of file %s : %s \n\r"
1718 /**
1819 * \def MURASAKI_ASSERT
1920 * \param COND Condition as bool type.
@@ -43,6 +44,29 @@
4344 }
4445 #endif
4546
47+/**
48+ * \def MURASAKI_PRINT_ERROR
49+ * \param ERR Condition as bool type.
50+ * \brief Print ERR if ERR is true
51+ * \details
52+ * Print the ERR expression to the logging port if COND is true. Do nothing if ERR is true.
53+ *
54+ * This assertion do nothing if programmer defines \ref MURASAKI_CONFIG_NODEBUG macro as true.
55+ * This macro is defined in the file \ref platform_config.hpp.
56+ *
57+ * \ingroup MURASAKI_GROUP
58+ */
59+#if MURASAKI_CONFIG_NODEBUG
60+#define MURASAKI_PRINT_ERROR( ERR )
61+#else
62+#define MURASAKI_PRINT_ERROR( ERR )\
63+ if ( (ERR) )\
64+ {\
65+ murasaki::debugger->printf(MURASAKI_ERROR_MSG, __func__, __LINE__,__FILE__, #ERR );\
66+ }
67+#endif
68+
69+
4670 namespace murasaki {
4771 /**
4872 * \brief Grobal variable to provide the debugging function.