summaryrefslogtreecommitdiffstats
path: root/src/thread.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread.cc')
-rw-r--r--src/thread.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/thread.cc b/src/thread.cc
index 54d2e6c..841ea9b 100644
--- a/src/thread.cc
+++ b/src/thread.cc
@@ -344,9 +344,13 @@ void Thread::InitStackHwm() {
CHECK_PTHREAD_CALL(pthread_attr_destroy, (&attributes), __FUNCTION__);
}
-void Thread::Dump(std::ostream& os) const {
+void Thread::Dump(std::ostream& os, bool dump_pending_exception) const {
DumpState(os);
DumpStack(os);
+ if (dump_pending_exception && IsExceptionPending()) {
+ os << "Pending " << PrettyTypeOf(GetException()) << " on thread:\n";
+ os << GetException()->Dump();
+ }
}
std::string GetSchedulerGroup(pid_t tid) {