summaryrefslogtreecommitdiff
path: root/ted.c
diff options
context:
space:
mode:
Diffstat (limited to 'ted.c')
-rw-r--r--ted.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ted.c b/ted.c
index e8608b2..fc54a93 100644
--- a/ted.c
+++ b/ted.c
@@ -138,6 +138,12 @@ void ted_set_message(Ted *ted, MessageType type, const char *fmt, ...) {
void ted_error(Ted *ted, const char *fmt, ...) {
va_list args;
va_start(args, fmt);
+#if DEBUG
+ va_list args2;
+ va_copy(args2, args);
+ vfprintf(stderr, fmt, args2);
+ fprintf(stderr, "\n");
+#endif
ted_vset_message(ted, MESSAGE_ERROR, fmt, args);
va_end(args);
}