diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-10-29 23:19:31 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-10-29 23:19:31 -0400 |
commit | 29963e449e8e4c8a3b4eeda9ef9a57083184697d (patch) | |
tree | fc5c72d643b661102efa41ea32942cfa779a43c6 | |
parent | 7c414dea9bb4c65d6a0e4426a0d6ac172500f4b6 (diff) | |
download | dimension-29963e449e8e4c8a3b4eeda9ef9a57083184697d.tar.xz |
Make sure we die on critical dmnsn_error()'s.
-rw-r--r-- | libdimension/error.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libdimension/error.c b/libdimension/error.c index 57880f9..da7b8bd 100644 --- a/libdimension/error.c +++ b/libdimension/error.c @@ -39,6 +39,7 @@ dmnsn_report_error(dmnsn_severity severity, const char *func, unsigned int line, /* An error more severe than our resilience happened, bail out */ fprintf(stderr, "Dimension ERROR: %s, line %u: %s\n", func, line, str); (*dmnsn_fatal)(); + exit(EXIT_FAILURE); /* Failsafe in case *dmnsn_fatal doesn't exit */ } else { /* A trivial error happened, warn and continue */ fprintf(stderr, "Dimension WARNING: %s, line %u: %s\n", func, line, str); @@ -76,6 +77,7 @@ dmnsn_set_resilience(dmnsn_severity resilience) fprintf(stderr, "Dimension ERROR: %s, line %u: %s\n", DMNSN_FUNC, __LINE__, "Resilience has wrong value."); (*dmnsn_fatal)(); + exit(EXIT_FAILURE); } if (pthread_mutex_lock(&dmnsn_resilience_mutex) != 0) { |