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