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

Unified Diff: net/http2/hpack/tools/hpack_example.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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
Index: net/http2/hpack/tools/hpack_example.cc
diff --git a/net/http2/hpack/tools/hpack_example.cc b/net/http2/hpack/tools/hpack_example.cc
index 72fd5810e991d0ef563e9c64cf2d3c9265a97489..c22d8e833ff71dc122955ff269457f0bc6f120ba 100644
--- a/net/http2/hpack/tools/hpack_example.cc
+++ b/net/http2/hpack/tools/hpack_example.cc
@@ -20,9 +20,11 @@ void HpackExampleToStringOrDie(StringPiece example, string* output) {
while (!example.empty()) {
const char c0 = example[0];
if (isxdigit(c0)) {
- CHECK_GT(example.size(), 1u) << "Truncated hex byte?";
+ // Truncated hex byte?
+ CHECK_GT(example.size(), 1u);
const char c1 = example[1];
- CHECK(isxdigit(c1)) << "Found half a byte?";
+ // Found half a byte?
+ CHECK(isxdigit(c1));
*output += a2b_hex(example.substr(0, 2).as_string().c_str());
example.remove_prefix(2);
continue;
@@ -41,11 +43,10 @@ void HpackExampleToStringOrDie(StringPiece example, string* output) {
example.remove_prefix(pos + 1);
continue;
}
- CHECK(false) << "Can't parse byte " << static_cast<int>(c0) << " (0x"
- << std::hex << c0 << ")"
- << "\nExample: " << example;
+ CHECK(false);
}
- CHECK_LT(0u, output->size()) << "Example is empty.";
+ // Example is empty.
+ CHECK_LT(0u, output->size());
return;
}

Powered by Google App Engine
This is Rietveld 408576698