From 0ced7d8e567aa12dde0a07a19bc31867ddc38665 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Wed, 7 Mar 2012 01:16:50 -0800 Subject: [PATCH] Improve error reporting for builtin_test --- builtin_test.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/builtin_test.cpp b/builtin_test.cpp index 16403598c..9f344c137 100644 --- a/builtin_test.cpp +++ b/builtin_test.cpp @@ -379,9 +379,12 @@ namespace test_expressions { expression *result = parser.parse_expression(0, (unsigned int)args.size()); /* Handle errors */ for (size_t i = 0; i < parser.errors.size(); i++) { - if (i > 0) - err.push_back(L'\n'); + err.append(L"test: "); err.append(parser.errors.at(i)); + err.push_back(L'\n'); + + // For now we only show the first error + break; } return result; }