summaryrefslogtreecommitdiff
path: root/base/HidlSupport.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2017-05-03 01:12:42 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-05-03 01:12:42 +0000
commitbbf3d92a4194c22e0609403dc47d94d1846bf437 (patch)
treebc8d2f0487a442c4447169b0c0a469a5ce471df4 /base/HidlSupport.cpp
parentea6fb3957a722f17b4759e04db6ea806fd5dadf5 (diff)
parent5c263a6eba2788a381b6424bc18e08ddd7d55d36 (diff)
downloadlibhidl-bbf3d92a4194c22e0609403dc47d94d1846bf437.tar.gz
Merge "Include failure reasons in FATAL logging." am: 57c78074bd am: fd72194b3a
am: 5c263a6eba Change-Id: Ic3d5d8d77c1fc8a7ad81ebb4a21a0cb5741c806a
Diffstat (limited to 'base/HidlSupport.cpp')
-rw-r--r--base/HidlSupport.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/base/HidlSupport.cpp b/base/HidlSupport.cpp
index 8223599..4de7f7c 100644
--- a/base/HidlSupport.cpp
+++ b/base/HidlSupport.cpp
@@ -70,7 +70,7 @@ hidl_handle &hidl_handle::operator=(const hidl_handle &other) {
if (other.mHandle != nullptr) {
mHandle = native_handle_clone(other.mHandle);
if (mHandle == nullptr) {
- LOG(FATAL) << "Failed to clone native_handle in hidl_handle.";
+ PLOG(FATAL) << "Failed to clone native_handle in hidl_handle";
}
mOwnsHandle = true;
} else {
@@ -218,7 +218,7 @@ void hidl_string::copyFrom(const char *data, size_t size) {
// assume my resources are freed.
if (size > UINT32_MAX) {
- LOG(FATAL) << "string size can't exceed 2^32 bytes.";
+ LOG(FATAL) << "string size can't exceed 2^32 bytes: " << size;
}
char *buf = (char *)malloc(size + 1);
memcpy(buf, data, size);
@@ -252,7 +252,7 @@ void hidl_string::clear() {
void hidl_string::setToExternal(const char *data, size_t size) {
if (size > UINT32_MAX) {
- LOG(FATAL) << "string size can't exceed 2^32 bytes.";
+ LOG(FATAL) << "string size can't exceed 2^32 bytes: " << size;
}
clear();