shared_fooの不要ディレクトリ削除前のもの
Revision | fdead336ab2ad9d3573e26fe9b348e376f8868bf (tree) |
---|---|
Time | 2018-02-19 23:28:52 |
Author | takemasa <suikan@user...> |
Commiter | takemasa |
Added MURASAKI_PRINT_ERROR
@@ -14,6 +14,7 @@ | ||
14 | 14 | #include "debug.hpp" |
15 | 15 | |
16 | 16 | #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" | |
17 | 18 | /** |
18 | 19 | * \def MURASAKI_ASSERT |
19 | 20 | * \param COND Condition as bool type. |
@@ -43,6 +44,29 @@ | ||
43 | 44 | } |
44 | 45 | #endif |
45 | 46 | |
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 | + | |
46 | 70 | namespace murasaki { |
47 | 71 | /** |
48 | 72 | * \brief Grobal variable to provide the debugging function. |