diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-04-12 15:42:04 +0000 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-04-12 15:42:04 +0000 |
commit | 4f9f95a05a41bfbcc9965eaaf7f2d14c6af9f261 (patch) | |
tree | c5d3d649d36e6102708d0f86edb87499e1ff8c3e /libdimension/error.c | |
parent | 510c9a95fb5f3f4a40a19ce66c95344c2013085f (diff) | |
download | dimension-4f9f95a05a41bfbcc9965eaaf7f2d14c6af9f261.tar.xz |
Write C++ libdimension-png wrapper.
Diffstat (limited to 'libdimension/error.c')
-rw-r--r-- | libdimension/error.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libdimension/error.c b/libdimension/error.c index 9dae673..6edf577 100644 --- a/libdimension/error.c +++ b/libdimension/error.c @@ -30,10 +30,10 @@ void dmnsn_report_error(dmnsn_severity severity, const char *func, const char *str) { if (severity >= dmnsn_get_resilience()) { - fprintf(stderr, "Dimension ERROR: %s(): %s\n", func, str); + fprintf(stderr, "Dimension ERROR: %s: %s\n", func, str); exit(EXIT_FAILURE); } else { - fprintf(stderr, "Dimension WARNING: %s(): %s\n", func, str); + fprintf(stderr, "Dimension WARNING: %s: %s\n", func, str); } } @@ -42,12 +42,12 @@ dmnsn_get_resilience() { dmnsn_severity resilience; if (pthread_mutex_lock(&dmnsn_resilience_mutex) != 0) { - fprintf(stderr, "Dimension WARNING: %s(): %s\n", __func__, + fprintf(stderr, "Dimension WARNING: %s: %s\n", __PRETTY_FUNCTION__, "Couldn't lock resilience mutex."); } resilience = dmnsn_resilience; if (pthread_mutex_unlock(&dmnsn_resilience_mutex) != 0) { - fprintf(stderr, "Dimension WARNING: %s(): %s\n", __func__, + fprintf(stderr, "Dimension WARNING: %s: %s\n", __PRETTY_FUNCTION__, "Couldn't unlock resilience mutex."); } return resilience; @@ -57,18 +57,18 @@ void dmnsn_set_resilience(dmnsn_severity resilience) { if (resilience > DMNSN_SEVERITY_HIGH) { - fprintf(stderr, "Dimension ERROR: %s(): %s\n", __func__, + fprintf(stderr, "Dimension ERROR: %s: %s\n", __PRETTY_FUNCTION__, "Resilience has wrong value."); exit(EXIT_FAILURE); } if (pthread_mutex_lock(&dmnsn_resilience_mutex) != 0) { - fprintf(stderr, "Dimension WARNING: %s(): %s\n", __func__, + fprintf(stderr, "Dimension WARNING: %s: %s\n", __PRETTY_FUNCTION__, "Couldn't lock resilience mutex."); } dmnsn_resilience = resilience; if (pthread_mutex_unlock(&dmnsn_resilience_mutex) != 0) { - fprintf(stderr, "Dimension WARNING: %s(): %s\n", __func__, + fprintf(stderr, "Dimension WARNING: %s: %s\n", __PRETTY_FUNCTION__, "Couldn't unlock resilience mutex."); } } |