mirror of https://github.com/Icinga/icinga2.git
Defer: ensure not to throw any exceptions out of a destructor
refs #6989
This commit is contained in:
parent
e2df11520e
commit
a9841a9197
|
@ -30,7 +30,11 @@ public:
|
|||
inline
|
||||
~Defer()
|
||||
{
|
||||
m_Func();
|
||||
try {
|
||||
m_Func();
|
||||
} catch (...) {
|
||||
// https://stackoverflow.com/questions/130117/throwing-exceptions-out-of-a-destructor
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in New Issue