Skip to content

Commit f96cdf6

Browse files
committed
adjusted catch handlers
1 parent 25bc0de commit f96cdf6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

simplecpp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ simplecpp::TokenList::TokenList(const std::string &filename, std::vector<std::st
490490
try {
491491
FileStream stream(filename, filenames);
492492
readfile(stream,filename,outputList);
493-
} catch (const simplecpp::Output & e) { // TODO handle extra type of errors
493+
} catch (const simplecpp::Output & e) {
494494
outputList->push_back(e);
495495
}
496496
}
@@ -3691,7 +3691,7 @@ void simplecpp::preprocess(simplecpp::TokenList &output, const simplecpp::TokenL
36913691
const long long result = evaluate(expr, dui, sizeOfType);
36923692
conditionIsTrue = (result != 0);
36933693
}
3694-
} catch (const std::exception &e) {
3694+
} catch (const std::runtime_error &e) {
36953695
if (outputList) {
36963696
std::string msg = "failed to evaluate " + std::string(rawtok->str() == IF ? "#if" : "#elif") + " condition";
36973697
if (e.what() && *e.what())

0 commit comments

Comments
 (0)