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

Improved console error messages #669

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions appshell/cefclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,21 +101,21 @@ void AppGetSettings(CefSettings& settings, CefRefPtr<CefCommandLine> 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<int>(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 << ".";
}
}
}
Expand Down