Skip to content

Commit 9a27d3a

Browse files
committed
Print exception message from threads
1 parent 30e556d commit 9a27d3a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

paddle/fluid/framework/threadpool.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ class ThreadPool {
6767
} catch (platform::EnforceNotMet ex) {
6868
return std::unique_ptr<platform::EnforceNotMet>(
6969
new platform::EnforceNotMet(ex));
70-
} catch (...) {
71-
LOG(FATAL)
72-
<< "Unexpected exception is catched in thread pool. All "
73-
"throwable exception in Fluid should be an EnforceNotMet.";
70+
} catch (const std::exception& e) {
71+
LOG(FATAL) << "Unexpected exception is catched in thread pool. All "
72+
"throwable exception in Fluid should be an EnforceNotMet."
73+
<< e.what();
7474
}
7575
return nullptr;
7676
});

0 commit comments

Comments
 (0)