From 86ae06c77c6958c569866e1a9f79274f3e96111c Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 23 Jun 2025 12:54:53 +0200 Subject: [PATCH] style(core/check): using the new error message --- sources/core/check.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sources/core/check.cpp b/sources/core/check.cpp index a35da1d..558d692 100644 --- a/sources/core/check.cpp +++ b/sources/core/check.cpp @@ -6,11 +6,12 @@ /* By: sben-tay +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/05/13 11:25:04 by rparodi #+# #+# */ -/* Updated: 2025/06/21 18:49:43 by sben-tay ### ########.fr */ +/* Updated: 2025/06/23 12:44:32 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ #include "core.hpp" +#include "logs.hpp" #include #include #include @@ -28,7 +29,7 @@ unsigned short int valid_port(char *input) for (size_t i = 0; input[i]; i++) { if (!isdigit(input[i])) { if (DEBUG) - std::cerr << LOG << CLR_RED << "Error: Not only number in port: " << input << std::endl; + ERROR_MSG("Not only number in port: " << input); return (0); } } @@ -36,7 +37,7 @@ unsigned short int valid_port(char *input) int port = strtol(input, NULL, 10); if (errno == ERANGE) { if (DEBUG) - std::cerr << LOG << CLR_RED << "Error: Port out of range: " << input << std::endl; + ERROR_MSG("Port out of range" << input); return (0); } if (port < 1 || port > 65535)