Chromium Code Reviews| Index: webrtc/base/checks.cc |
| diff --git a/webrtc/base/checks.cc b/webrtc/base/checks.cc |
| index 49a31f29b9df4e4d6bca59e4d5f338a5a15ae802..82e047fa9f2338cb7950b327368b9d43354546d9 100644 |
| --- a/webrtc/base/checks.cc |
| +++ b/webrtc/base/checks.cc |
| @@ -22,11 +22,16 @@ |
| #endif |
| #if defined(WEBRTC_ANDROID) |
| -#define LOG_TAG "rtc" |
| +#define RTC_LOG_TAG "rtc" |
| #include <android/log.h> // NOLINT |
| #endif |
| +#if defined(WEBRTC_WIN) |
| +#include <windows.h> |
| +#endif |
| + |
| #include "webrtc/base/checks.h" |
| +#include "webrtc/base/logging.h" |
| #if defined(_MSC_VER) |
| // Warning C4722: destructor never returns, potential memory leak. |
| @@ -38,7 +43,7 @@ namespace rtc { |
| void VPrintError(const char* format, va_list args) { |
| #if defined(WEBRTC_ANDROID) |
| - __android_log_vprint(ANDROID_LOG_ERROR, LOG_TAG, format, args); |
| + __android_log_vprint(ANDROID_LOG_ERROR, RTC_LOG_TAG, format, args); |
| #else |
| vfprintf(stderr, format, args); |
| #endif |
| @@ -105,8 +110,11 @@ NO_RETURN FatalMessage::~FatalMessage() { |
| } |
| void FatalMessage::Init(const char* file, int line) { |
| - stream_ << std::endl << std::endl << "#" << std::endl << "# Fatal error in " |
| - << file << ", line " << line << std::endl << "# "; |
| + stream_ << std::endl << std::endl |
| + << "#" << std::endl |
| + << "# Fatal error in " << file << ", line " << line << std::endl |
| + << "# last error=" << LAST_SYSTEM_ERROR << std::endl |
|
perkj_webrtc
2016/04/22 05:17:30
Suggest " last system error: " (or=)
It seems to
tommi
2016/04/22 07:12:24
Done.
|
| + << "# "; |
| } |
| // MSVC doesn't like complex extern templates and DLLs. |