summaryrefslogtreecommitdiff
path: root/libs/binder/Status.cpp
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2019-11-15 00:15:33 -0800
committer Steven Moreland <smoreland@google.com> 2019-11-15 00:16:52 -0800
commit56b2c4bb35107a2903f97a72bcd695ab397c39de (patch)
treeeca52214e759d53cc5d8e639d67256bf35dbba35 /libs/binder/Status.cpp
parent7618ed32d33610761b14083866d34eaa4540fd9b (diff)
Status: toString8, include stringified status_t
"-2147483640" is not a clear error message. "UNEXPECTED_NULL" is. Bug: 144534032 Test: TH Change-Id: I235bb1abb88481ffba4c140c27223077880e4dd0
Diffstat (limited to 'libs/binder/Status.cpp')
-rw-r--r--libs/binder/Status.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/binder/Status.cpp b/libs/binder/Status.cpp
index 0ad99cee3f..674f0657a9 100644
--- a/libs/binder/Status.cpp
+++ b/libs/binder/Status.cpp
@@ -232,9 +232,10 @@ String8 Status::toString8() const {
ret.append("No error");
} else {
ret.appendFormat("Status(%d, %s): '", mException, exceptionToString(mException).c_str());
- if (mException == EX_SERVICE_SPECIFIC ||
- mException == EX_TRANSACTION_FAILED) {
+ if (mException == EX_SERVICE_SPECIFIC) {
ret.appendFormat("%d: ", mErrorCode);
+ } else if (mException == EX_TRANSACTION_FAILED) {
+ ret.appendFormat("%s: ", statusToString(mErrorCode).c_str());
}
ret.append(String8(mMessage));
ret.append("'");