Status: toString8, include stringified status_t
"-2147483640" is not a clear error message. "UNEXPECTED_NULL" is.
Bug: 144534032
Test: TH
Change-Id: I235bb1abb88481ffba4c140c27223077880e4dd0
diff --git a/libs/binder/Status.cpp b/libs/binder/Status.cpp
index 0ad99ce..674f065 100644
--- a/libs/binder/Status.cpp
+++ b/libs/binder/Status.cpp
@@ -232,9 +232,10 @@
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("'");