From 99313ebc6c3779f692f9f1bd70cc69a236f5eb78 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 31 Jul 2008 06:24:45 -0400 Subject: Revised the way that exceptions are thrown around. Instead of context being a complicated string of pointers, it's now just a global block of text that gets appended to as the error is being thrown up, and can be displayed at the catch point if desired. There are almost no cases where a thrown exception will not result in an error message being displayed to the user. --- qif.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'qif.cc') diff --git a/qif.cc b/qif.cc index bb8d2c55..ee9318d2 100644 --- a/qif.cc +++ b/qif.cc @@ -75,7 +75,7 @@ unsigned int qif_parser_t::parse(std::istream& in, case '\t': if (peek_next_nonws(in) != '\n') { get_line(in); - throw new parse_error("Line begins with whitespace"); + throw parse_error("Line begins with whitespace"); } // fall through... @@ -92,8 +92,7 @@ unsigned int qif_parser_t::parse(std::istream& in, std::strcmp(line, "Type:Cat") == 0 || std::strcmp(line, "Type:Class") == 0 || std::strcmp(line, "Type:Memorized") == 0) - throw new parse_error(string("QIF files of type ") + line + - " are not supported."); + throw_(parse_error, "QIF files of type " << line << " are not supported."); break; case 'D': -- cgit v1.2.3