Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/plugins/cpp/templates/lr.template.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class {{{PARSER_CLASS_NAME}}} {
if (token->type == TokenType::__EOF && !tokenizer.hasMoreTokens()) {
std::string errMsg = "Unexpected end of input.\n";
std::cerr << errMsg;
throw std::runtime_error(errMsg.c_str());
std::exit(EXIT_FAILURE);
}
tokenizer.throwUnexpectedToken(token->value, token->startLine,
token->startColumn);
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/cpp/templates/tokenizer.template.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ class Tokenizer {
<< ":" << column << "\n\n";

std::cerr << errMsg.str();
throw new std::runtime_error(errMsg.str().c_str());
std::exit(1);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be EXIT_FAILURE as well?

}

/**
Expand Down