summaryrefslogtreecommitdiffstats
path: root/libdimension/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension/error.c')
-rw-r--r--libdimension/error.c14
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.");
}
}