mirror of
https://github.com/3lswear/webserv.git
synced 2025-10-28 21:07:59 +03:00
feat: change to exception
This commit is contained in:
@@ -68,16 +68,15 @@ namespace config
|
||||
|
||||
struct s_token Tokenizer::getToken(void)
|
||||
{
|
||||
char c;
|
||||
struct s_token token;
|
||||
|
||||
if (file.eof())
|
||||
{
|
||||
std::cout << "Tokens exhausted" << std::endl;
|
||||
throw std::logic_error("Tokens exhausted");
|
||||
DBOUT << RED << "Tokens exhausted" << ENDL;
|
||||
throw NoMoreTokens();
|
||||
}
|
||||
prev_pos = file.tellg();
|
||||
c = getWithoutWhiteSpace();
|
||||
char c = getWithoutWhiteSpace();
|
||||
|
||||
if (firstToken() && config::istomlkey(c))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user