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

Unified Diff: third_party/protobuf/src/google/protobuf/stubs/common.cc

Issue 6737030: third_party/protobuf: update to upstream r371 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
Index: third_party/protobuf/src/google/protobuf/stubs/common.cc
diff --git a/third_party/protobuf/src/google/protobuf/stubs/common.cc b/third_party/protobuf/src/google/protobuf/stubs/common.cc
index 1e2d68d2f0cd0c04a0be8842f0a8046a263e56e8..7b15be44d8f57cd37949a5ed8e524aad65726b25 100644
--- a/third_party/protobuf/src/google/protobuf/stubs/common.cc
+++ b/third_party/protobuf/src/google/protobuf/stubs/common.cc
@@ -191,7 +191,11 @@ void LogMessage::Finish() {
}
if (level_ == LOGLEVEL_FATAL) {
+#ifdef PROTOBUF_USE_EXCEPTIONS
+ throw FatalException(filename_, line_, message_);
+#else
abort();
+#endif
}
}
@@ -361,5 +365,13 @@ void ShutdownProtobufLibrary() {
internal::shutdown_functions_mutex = NULL;
}
+#ifdef PROTOBUF_USE_EXCEPTIONS
+FatalException::~FatalException() throw() {}
+
+const char* FatalException::what() const throw() {
+ return message_.c_str();
+}
+#endif
+
} // namespace protobuf
} // namespace google
« no previous file with comments | « third_party/protobuf/src/google/protobuf/stubs/common.h ('k') | third_party/protobuf/src/google/protobuf/stubs/hash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698