A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Don't throw an exception from destructor.
[simgrid.git]
/
src
/
kernel
/
activity
/
MailboxImpl.cpp
diff --git
a/src/kernel/activity/MailboxImpl.cpp
b/src/kernel/activity/MailboxImpl.cpp
index
7ee160c
..
b738381
100644
(file)
--- a/
src/kernel/activity/MailboxImpl.cpp
+++ b/
src/kernel/activity/MailboxImpl.cpp
@@
-21,7
+21,11
@@
unsigned MailboxImpl::next_id_ = 0;
MailboxImpl::~MailboxImpl()
{
- clear(false);
+ try {
+ clear(false);
+ } catch (const std::bad_alloc& ba) {
+ XBT_ERROR("MailboxImpl::clear() failure: %s", ba.what());
+ }
set_receiver(nullptr);
}