feat(tokenizer): add exceptions

This commit is contained in:
3lswear
2022-02-12 18:54:45 +03:00
parent 7df10265e0
commit 3a5879eb4d
3 changed files with 47 additions and 8 deletions

View File

@@ -35,7 +35,7 @@ namespace config
s_token current;
try { current = tokenizer.getToken(); }
catch (std::logic_error e)
catch (std::exception &e)
{
std::cerr << e.what() << std::endl;
return;
@@ -71,7 +71,7 @@ namespace config
{
s_token nextToken;
try { nextToken = tokenizer.getToken(); }
catch (std::logic_error e)
catch (std::exception &e)
{
std::cerr << e.what() << std::endl;
break;
@@ -158,7 +158,7 @@ namespace config
s_token current;
try { current = tokenizer.getToken(); }
catch (std::logic_error e)
catch (std::exception &e)
{
std::cerr << e.what() << std::endl;
return;
@@ -313,7 +313,7 @@ namespace config
{
s_token current;
try { current = tokenizer.getToken(); }
catch (std::logic_error e)
catch (std::exception &e)
{
std::cerr << e.what() << std::endl;
break;