diff --git a/src/headers/parsing/Parser.hpp b/src/headers/parsing/Parser.hpp index 129d4bc..b8f10f3 100644 --- a/src/headers/parsing/Parser.hpp +++ b/src/headers/parsing/Parser.hpp @@ -37,7 +37,7 @@ namespace Parser { if (current.toktext == "class") { if (next.toktype == IDENTIFIER) { parseTree << Class(next.toktext); ++i; - } else throw ParsingException('"' + next.toktext + "\" is not a valid class identifier"); + } else throw ParsingException((not next.toktext.empty()) ? '"' + next.toktext + "\" is not a valid class identifier" : "A class identifier is required", next.line); } else { if ((lexed.size() - i) > 2) { bool isFinalDefine = nextAre(2, TAG, DEFINE);