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 |