Add debug data for UConvScoper failures
This adds more log data to understand why the charset converter fails
on some Chrome OS bots.
R=mkwst@chromium.org
Bug: 1068489
Change-Id: I4abca82cdffdd60ffd7c15f186c79768c2a1c8c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2139651
Auto-Submit: Dominic Battré <battre@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#756992}
This commit is contained in:

committed by
Commit Bot

parent
76b8a9bf61
commit
abd148d623
@ -4,6 +4,7 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/stl_util.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "third_party/icu/source/common/unicode/ucnv.h"
|
||||
@ -22,6 +23,10 @@ class UConvScoper {
|
||||
explicit UConvScoper(const char* charset_name) {
|
||||
UErrorCode err = U_ZERO_ERROR;
|
||||
converter_ = ucnv_open(charset_name, &err);
|
||||
if (!converter_) {
|
||||
LOG(ERROR) << "Failed to open charset " << charset_name << ": "
|
||||
<< u_errorName(err);
|
||||
}
|
||||
}
|
||||
|
||||
~UConvScoper() {
|
||||
|
Reference in New Issue
Block a user