From 80058dfe8fb384f6e1529afa810c6a9bd08cdf88 Mon Sep 17 00:00:00 2001 From: "Manuel Amador (Rudd-O)" Date: Sat, 6 Feb 2016 00:45:49 +0000 Subject: Ensure that parse errors produce useful RuntimeErrors for Python code. --- src/error.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/error.h') diff --git a/src/error.h b/src/error.h index 73a0e395..26cbfafb 100644 --- a/src/error.h +++ b/src/error.h @@ -95,8 +95,9 @@ string source_context(const path& file, struct error_count { std::size_t count; - explicit error_count(std::size_t _count) : count(_count) {} - const char * what() const { return ""; } + std::string message; + explicit error_count(std::size_t _count, std::string _msg) : count(_count), message(_msg) {} + const char * what() const { return message.c_str(); } }; } // namespace ledger -- cgit v1.2.3