aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-12-03 05:24:38 +0100
committerSven Gothel <[email protected]>2020-12-03 05:24:38 +0100
commit5348dd1921028936285fa1a989a0fcadb8ec3bf0 (patch)
tree70d44544ed827e08f7c214052c11e9920361a3e0
parentd58e728d905e06f010b77805cf763a8d0c5c8bfd (diff)
debug.hpp: Add ERR_PRINT2(..) variant w/o backtracev0.2.5
-rw-r--r--include/jau/debug.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/jau/debug.hpp b/include/jau/debug.hpp
index 13e1008..0dbe11b 100644
--- a/include/jau/debug.hpp
+++ b/include/jau/debug.hpp
@@ -117,9 +117,12 @@ namespace jau {
void ERR_PRINT_impl(const char *prefix, const bool backtrace, const char *func, const char *file, const int line, const char * format, ...) noexcept;
- /** Use for unconditional error messages, prefix '[elapsed_time] Error @ FILE:LINE: '. Function also appends last errno and strerror(errno). */
+ /** Use for unconditional error messages, prefix '[elapsed_time] Error @ FILE:LINE: '. Function also appends last errno, strerror(errno) and full backtrace*/
#define ERR_PRINT(...) { jau::ERR_PRINT_impl("Error", true /* backtrace */, __func__, __FILE__, __LINE__, __VA_ARGS__); }
+ /** Use for unconditional error messages, prefix '[elapsed_time] Error @ FILE:LINE: '. Function also appends last errno and strerror(errno). No backtrace. */
+ #define ERR_PRINT2(...) { jau::ERR_PRINT_impl("Error", false /* backtrace */, __func__, __FILE__, __LINE__, __VA_ARGS__); }
+
/** Use for unconditional interruption messages, prefix '[elapsed_time] Interrupted @ FILE:LINE: '. Function also appends last errno and strerror(errno). */
#define IRQ_PRINT(...) { jau::ERR_PRINT_impl("Interrupted", false /* backtrace */, __func__, __FILE__, __LINE__, __VA_ARGS__); }