aboutsummaryrefslogtreecommitdiffstats
path: root/src/dbg.h
diff options
context:
space:
mode:
authorTharre <tharre3@gmail.com>2014-11-16 19:19:59 +0100
committerTharre <tharre3@gmail.com>2014-11-16 19:19:59 +0100
commitdf9bc5b9d048c7ecb96838123e39d5bc7c23aa18 (patch)
tree5432d5cc4a0e5a7550f7bae00964f09cb68b6361 /src/dbg.h
parentb4c1b2145d6a0b1ec4219847dc26877046f84e8b (diff)
downloadredo-df9bc5b9d048c7ecb96838123e39d5bc7c23aa18.tar.gz
redo-df9bc5b9d048c7ecb96838123e39d5bc7c23aa18.tar.xz
redo-df9bc5b9d048c7ecb96838123e39d5bc7c23aa18.zip
Refactor error handling system by using die()
Defined error messages have also been replaced with string literals.
Diffstat (limited to 'src/dbg.h')
-rw-r--r--src/dbg.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/dbg.h b/src/dbg.h
index 28a6fae..ef86cac 100644
--- a/src/dbg.h
+++ b/src/dbg.h
@@ -22,9 +22,6 @@
/* helper functions which help in replacing the GNU extension ##__VA_ARGS__ */
#define STRINGIFY(x) #x
#define LOG_HELPER(f,l,...) fprintf(stderr, "("f":"STRINGIFY(l)"): "__VA_ARGS__)
-#define FATAL_HELPER(M, ...) log_err(M ": %s\n", __VA_ARGS__)
-#define FATAL_HELPER_(f,l,M,...) \
- fprintf(stderr, "(%s:%u): " M ": %s\n", f, l, __VA_ARGS__)
#ifdef NDEBUG
#define debug(...)
@@ -33,10 +30,6 @@
#endif
#define log_err(...) LOG_HELPER(_FILENAME, __LINE__, __VA_ARGS__)
-#define fatal(...) \
- ({FATAL_HELPER(__VA_ARGS__, strerror(errno)); exit(EXIT_FAILURE);})
-#define fatal_(f,l,...) \
- ({FATAL_HELPER_(f, l, __VA_ARGS__, strerror(errno)); exit(EXIT_FAILURE);})
#define assert_str_equal(a,b) ({ \
if (strcmp(a, b)) { \