diff --git a/.gitignore b/.gitignore index 51dbfd64..185bdc57 100644 --- a/.gitignore +++ b/.gitignore @@ -47,4 +47,8 @@ webserv tester/test_file.txt # OS generated files -.DS_Store \ No newline at end of file +.DS_Store + +# Testers venv +*/venv +*/*/__pycache__ \ No newline at end of file diff --git a/src/configuration/Parser.cpp b/src/configuration/Parser.cpp index 5238319b..67a7e1ae 100644 --- a/src/configuration/Parser.cpp +++ b/src/configuration/Parser.cpp @@ -3,10 +3,10 @@ /* ::: :::::::: */ /* Parser.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: flfische +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/10/02 14:02:16 by lgreau #+# #+# */ -/* Updated: 2025/01/16 13:41:13 by flfische ### ########.fr */ +/* Updated: 2025/01/16 17:59:38 by lgreau ### ########.fr */ /* */ /* ************************************************************************** */ @@ -311,9 +311,9 @@ ServerConfig Parser::parseServer() { } default: + reportError(UNEXPECTED_TOKEN, "something", _currentToken.value); _currentToken = _lexer.nextToken(); break; - // throw std::runtime_error("Unexpected token in server body"); } } @@ -536,7 +536,9 @@ Route Parser::parseRoute() { } default: - throw std::runtime_error("Unexpected token in route body"); + reportError(UNEXPECTED_TOKEN, "something", _currentToken.value); + _currentToken = _lexer.nextToken(); + break; } }