Skip to content

Commit

Permalink
Improved console error messages (adobe#669)
Browse files Browse the repository at this point in the history
  • Loading branch information
g-217 committed Nov 18, 2019
1 parent 9a566b8 commit 340be0e
Showing 1 changed file with 8 additions and 8 deletions.
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

0 comments on commit 340be0e

Please sign in to comment.