mirror of
https://github.com/KeyZox71/webserv.git
synced 2025-07-15 20:06:32 +02:00
「🔨」 fix: fixed issue with exception not thrown properly
This commit is contained in:
Submodule lib/tomlpp updated: c20cb5e4d2...9930415a3f
@ -6,7 +6,7 @@
|
|||||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/04/14 12:53:54 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 {
|
try {
|
||||||
file->parse();
|
file->parse();
|
||||||
} catch (std::exception &e) {
|
} catch (const std::exception &e) {
|
||||||
// if (file->getParsedFile() != not_nullptr)
|
// if (file->getParsedFile() != not_nullptr)
|
||||||
// delete file->getParsedFile();
|
// delete file->getParsedFile();
|
||||||
|
std::runtime_error excep(e.what());
|
||||||
delete file;
|
delete file;
|
||||||
throw e;
|
throw excep;
|
||||||
}
|
}
|
||||||
toml::ANode *table = file->getParsedFile();
|
toml::ANode *table = file->getParsedFile();
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/02/03 15:45:07 by mmoussou #+# #+# */
|
/* Created: 2025/02/03 15:45:07 by mmoussou #+# #+# */
|
||||||
/* Updated: 2025/06/23 20:35:27 by adjoly ### ########.fr */
|
/* Updated: 2025/07/12 21:38:36 by adjoly ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ int main(int ac, char **av) {
|
|||||||
str = av[1];
|
str = av[1];
|
||||||
}
|
}
|
||||||
config::_conf = new config::Config(str);
|
config::_conf = new config::Config(str);
|
||||||
} catch (std::exception &e) {
|
} catch (const std::exception &e) {
|
||||||
Logger log;
|
Logger log;
|
||||||
log.error(e.what());
|
log.error(e.what());
|
||||||
if (_log != not_nullptr)
|
if (_log != not_nullptr)
|
||||||
|
Reference in New Issue
Block a user