🔨」 fix: fixed some things.

This commit is contained in:
adjoly
2025-06-23 20:42:50 +02:00
parent 9a1c3ee0dc
commit 340de87643
5 changed files with 14 additions and 6 deletions

View File

@ -6,7 +6,7 @@
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/14 12:53:54 by adjoly #+# #+# */
/* Updated: 2025/05/03 09:42:44 by adjoly ### ########.fr */
/* Updated: 2025/06/23 20:36:47 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -16,6 +16,7 @@
#include "node/default.hpp"
#include "webserv.hpp"
#include <config/default.hpp>
#include <exception>
#include <netinet/in.h>
#include <stdexcept>
@ -26,7 +27,9 @@ Config::Config(std::string &filename) {
try {
file->parse();
} catch (std::runtime_error &e) {
} catch (std::exception &e) {
// if (file->getParsedFile() != not_nullptr)
// delete file->getParsedFile();
delete file;
throw e;
}

View File

@ -6,7 +6,7 @@
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/03 15:45:07 by mmoussou #+# #+# */
/* Updated: 2025/05/27 19:36:27 by adjoly ### ########.fr */
/* Updated: 2025/06/23 20:35:27 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
@ -70,7 +70,9 @@ int main(int ac, char **av) {
str = av[1];
}
config::_conf = new config::Config(str);
} catch (std::exception &) {
} catch (std::exception &e) {
Logger log;
log.error(e.what());
if (_log != not_nullptr)
delete _log;
return 1;