Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(447)

Unified Diff: net/socket/nss_ssl_util.cc

Issue 207583003: Improve logging of NSS errors that do not map to network errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/nss_ssl_util.cc
diff --git a/net/socket/nss_ssl_util.cc b/net/socket/nss_ssl_util.cc
index 20911d5a67bdb8da8f0fb6d2b89109950a9adb61..4811e46f3934ed701f25b91c08769c2c090485cf 100644
--- a/net/socket/nss_ssl_util.cc
+++ b/net/socket/nss_ssl_util.cc
@@ -357,12 +357,16 @@ int MapNSSError(PRErrorCode err) {
return ERR_SSL_INAPPROPRIATE_FALLBACK;
default: {
+ const char* pr_error = PR_ErrorToName(err);
wtc 2014/03/25 15:29:40 This variable should be named "err_name" because i
+ if (pr_error == NULL)
+ pr_error = "";
if (IS_SSL_ERROR(err)) {
- LOG(WARNING) << "Unknown SSL error " << err
+ LOG(WARNING) << "Unknown SSL error " << err << " (" << pr_error << ")"
<< " mapped to net::ERR_SSL_PROTOCOL_ERROR";
return ERR_SSL_PROTOCOL_ERROR;
}
- LOG(WARNING) << "Unknown error " << err << " mapped to net::ERR_FAILED";
+ LOG(WARNING) << "Unknown error " << err << " (" << pr_error << ")"
+ << " mapped to net::ERR_FAILED";
return ERR_FAILED;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698