From 7ebaa5ef8a6f0f89875076b83fbb01cb602f58d9 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Tue, 17 Sep 2013 23:02:54 +0000 Subject: [PATCH] Default error handler prints to stderr, as it probably should have from the beginning --- ctags.d | 2 +- stdx/d/parser.d | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ctags.d b/ctags.d index d29515d..006341f 100644 --- a/ctags.d +++ b/ctags.d @@ -26,7 +26,7 @@ void printCtags(File output, string[] fileNames) f.rawRead(bytes); LexerConfig config; auto tokens = byToken(bytes, config); - Module m = parseModule(tokens.array(), fileName, &doNothing); + Module m = parseModule(tokens.array(), fileName); auto printer = new CTagsPrinter; printer.fileName = fileName; printer.visit(m); diff --git a/stdx/d/parser.d b/stdx/d/parser.d index d480f21..a0761d2 100644 --- a/stdx/d/parser.d +++ b/stdx/d/parser.d @@ -6240,7 +6240,7 @@ private: auto column = index < tokens.length ? tokens[index].column : 0; auto line = index < tokens.length ? tokens[index].line : 0; if (messageFunction is null) - writefln("%s(%d:%d)[warn]: %s", fileName, line, column, message); + stderr.writefln("%s(%d:%d)[warn]: %s", fileName, line, column, message); else messageFunction(fileName, line, column, message); } @@ -6255,7 +6255,7 @@ private: auto line = index < tokens.length ? tokens[index].line : tokens[$ - 1].line; if (messageFunction is null) { - writefln("%s(%d:%d)[error]: %s", fileName, line, column, message); + stderr.writefln("%s(%d:%d)[error]: %s", fileName, line, column, message); } else messageFunction(fileName, line, column, message);