mirror of
https://github.com/KeyZox71/webserv.git
synced 2025-06-25 09:33:36 +02:00
「🔨」 fix: fixed some things.
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user