diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-03-07 01:16:50 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-03-07 01:16:50 -0800 |
commit | 0ced7d8e567aa12dde0a07a19bc31867ddc38665 (patch) | |
tree | fdec1d16f7184510a9de17315664a8df6b45dfff /builtin_test.cpp | |
parent | 143ead8d00f57cbb6baa3830e2b9724d6d6a271a (diff) |
Improve error reporting for builtin_test
Diffstat (limited to 'builtin_test.cpp')
-rw-r--r-- | builtin_test.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/builtin_test.cpp b/builtin_test.cpp index 16403598..9f344c13 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; } |