From 340be0e37ccba982b04d1b03d95b167e82186c33 Mon Sep 17 00:00:00 2001 From: Gautam Jha Date: Mon, 18 Nov 2019 13:49:50 +0530 Subject: [PATCH] Improved console error messages (#669) --- appshell/cefclient.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/appshell/cefclient.cpp b/appshell/cefclient.cpp index 5d84d930b..f0f875658 100644 --- a/appshell/cefclient.cpp +++ b/appshell/cefclient.cpp @@ -101,21 +101,21 @@ void AppGetSettings(CefSettings& settings, CefRefPtr command_lin if (!debugger_port.empty()) { const long port = strtol(debugger_port.ToString().c_str(), NULL, 10); if (errno == ERANGE || port == 0) { - LOG(ERROR) << "Could not enable Remote debugging."; - LOG(ERROR) << "Error while parsing remote-debugging-port arg: "<< debugger_port.ToString(); + LOG(ERROR) << "Could not enable remote debugging." + << " Error while parsing remote-debugging-port arg: "<< debugger_port.ToString(); errno = 0; } else { - static const long max_port_num = 65535; - static const long max_reserved_port_num = 1024; - if (port > max_reserved_port_num && port < max_port_num) { + static const long max_port_num = 65534; + static const long max_reserved_port_num = 1025; + if (port >= max_reserved_port_num && port <= max_port_num) { g_remote_debugging_port = static_cast(port); settings.remote_debugging_port = g_remote_debugging_port; } else { - LOG(ERROR) << "Could not enable Remote debugging on port: "<< port - << ". Port number must be greater than "<< max_reserved_port_num - << " and less than " << max_port_num << "."; + LOG(ERROR) << "Cannot enable remote debugging on port "<< port + << ". Port numbers should be between "<< max_reserved_port_num + << " and " << max_port_num << "."; } } }