diff options
author | Jesse Hall <jessehall@google.com> | 2014-05-05 17:27:46 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-05-05 17:27:46 +0000 |
commit | 4314ccd1ba9fe773b0fc91f0a08dc536ebce8dfe (patch) | |
tree | 2532aac04551708efdf9dd059a04a5e8cba26e08 | |
parent | 44df726a6cf4fe1119e146c9a18c78966a6305d3 (diff) | |
parent | 70278fbfe012c1fce3e63a41ffb9feaf1e53a64a (diff) | |
download | frameworks_native-4314ccd1ba9fe773b0fc91f0a08dc536ebce8dfe.zip frameworks_native-4314ccd1ba9fe773b0fc91f0a08dc536ebce8dfe.tar.gz frameworks_native-4314ccd1ba9fe773b0fc91f0a08dc536ebce8dfe.tar.bz2 |
am 70278fbf: Merge "Add error message for hints when exceptions occur during binder transactions."
* commit '70278fbfe012c1fce3e63a41ffb9feaf1e53a64a':
Add error message for hints when exceptions occur during binder transactions.
-rw-r--r-- | libs/binder/Parcel.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index 4371c23..db6369d 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -25,6 +25,7 @@ #include <binder/ProcessState.h> #include <binder/TextOutput.h> +#include <errno.h> #include <utils/Debug.h> #include <utils/Log.h> #include <utils/String8.h> @@ -1241,7 +1242,11 @@ status_t Parcel::read(FlattenableHelperInterface& val) const status_t err = NO_ERROR; for (size_t i=0 ; i<fd_count && err==NO_ERROR ; i++) { fds[i] = dup(this->readFileDescriptor()); - if (fds[i] < 0) err = BAD_VALUE; + if (fds[i] < 0) { + err = BAD_VALUE; + ALOGE("dup() failed in Parcel::read, i is %d, fds[i] is %d, fd_count is %d, error: %s", + i, fds[i], fd_count, strerror(errno)); + } } if (err == NO_ERROR) { |