diff --git a/lib/tomlpp b/lib/tomlpp index c20cb5e..9930415 160000 --- a/lib/tomlpp +++ b/lib/tomlpp @@ -1 +1 @@ -Subproject commit c20cb5e4d262fbfc01301da9ea12748f927cc711 +Subproject commit 9930415a3fdaf5d1b2f8fa84465087703be614ee diff --git a/src/config/Config.cpp b/src/config/Config.cpp index 3654b97..e678f26 100644 --- a/src/config/Config.cpp +++ b/src/config/Config.cpp @@ -6,7 +6,7 @@ /* By: adjoly +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/04/14 12:53:54 by adjoly #+# #+# */ -/* Updated: 2025/06/23 20:36:47 by adjoly ### ########.fr */ +/* Updated: 2025/07/12 21:40:21 by adjoly ### ########.fr */ /* */ /* ************************************************************************** */ @@ -27,11 +27,12 @@ Config::Config(std::string &filename) { try { file->parse(); - } catch (std::exception &e) { + } catch (const std::exception &e) { // if (file->getParsedFile() != not_nullptr) // delete file->getParsedFile(); + std::runtime_error excep(e.what()); delete file; - throw e; + throw excep; } toml::ANode *table = file->getParsedFile(); diff --git a/src/main.cpp b/src/main.cpp index 2361b93..ed534f8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6,7 +6,7 @@ /* By: mmoussou