summaryrefslogtreecommitdiff
path: root/profcollectd
diff options
context:
space:
mode:
authorYi Kong <yikong@google.com>2021-03-29 16:53:03 +0800
committerYi Kong <yikong@google.com>2021-03-29 18:02:58 +0000
commitbbc9b4e9587ef0c58bd035c532e2c925e7611f99 (patch)
tree5b9147c829b20cf46363192feb5016036ed13aea /profcollectd
parent8671d27b327a17699c09485801ec7b709fb2a9e3 (diff)
downloadextras-bbc9b4e9587ef0c58bd035c532e2c925e7611f99.tar.gz
profcollectd: keep the entire error backtrace in Binder result
Show the error and all of its "causes" through Binder result, instead of just the top context. Test: Trigger an error Bug: 79161490 Change-Id: I538ff70069fb0e79faefde09f09dca164ea7aebf
Diffstat (limited to 'profcollectd')
-rw-r--r--profcollectd/libprofcollectd/service.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/profcollectd/libprofcollectd/service.rs b/profcollectd/libprofcollectd/service.rs
index 58b257de..94287e1d 100644
--- a/profcollectd/libprofcollectd/service.rs
+++ b/profcollectd/libprofcollectd/service.rs
@@ -34,7 +34,8 @@ use crate::report::pack_report;
use crate::scheduler::Scheduler;
fn err_to_binder_status(msg: Error) -> Status {
- let msg = CString::new(msg.to_string()).expect("Failed to convert to CString");
+ let msg = format!("{:#?}", msg);
+ let msg = CString::new(msg).expect("Failed to convert to CString");
Status::new_service_specific_error(1, Some(&msg))
}