Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Commit cc28521

Browse files
g-217vickramdhawal
authored andcommitted
Improved console error messages (#669)
1 parent fd8fce7 commit cc28521

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

appshell/cefclient.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,21 +101,21 @@ void AppGetSettings(CefSettings& settings, CefRefPtr<CefCommandLine> command_lin
101101
if (!debugger_port.empty()) {
102102
const long port = strtol(debugger_port.ToString().c_str(), NULL, 10);
103103
if (errno == ERANGE || port == 0) {
104-
LOG(ERROR) << "Could not enable Remote debugging.";
105-
LOG(ERROR) << "Error while parsing remote-debugging-port arg: "<< debugger_port.ToString();
104+
LOG(ERROR) << "Could not enable remote debugging."
105+
<< " Error while parsing remote-debugging-port arg: "<< debugger_port.ToString();
106106
errno = 0;
107107
}
108108
else {
109-
static const long max_port_num = 65535;
110-
static const long max_reserved_port_num = 1024;
111-
if (port > max_reserved_port_num && port < max_port_num) {
109+
static const long max_port_num = 65534;
110+
static const long max_reserved_port_num = 1025;
111+
if (port >= max_reserved_port_num && port <= max_port_num) {
112112
g_remote_debugging_port = static_cast<int>(port);
113113
settings.remote_debugging_port = g_remote_debugging_port;
114114
}
115115
else {
116-
LOG(ERROR) << "Could not enable Remote debugging on port: "<< port
117-
<< ". Port number must be greater than "<< max_reserved_port_num
118-
<< " and less than " << max_port_num << ".";
116+
LOG(ERROR) << "Cannot enable remote debugging on port "<< port
117+
<< ". Port numbers should be between "<< max_reserved_port_num
118+
<< " and " << max_port_num << ".";
119119
}
120120
}
121121
}

0 commit comments

Comments
 (0)