mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-30 00:54:30 +02:00
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
|
inline
|
||||||
~Defer()
|
~Defer()
|
||||||
{
|
{
|
||||||
m_Func();
|
try {
|
||||||
|
m_Func();
|
||||||
|
} catch (...) {
|
||||||
|
// https://stackoverflow.com/questions/130117/throwing-exceptions-out-of-a-destructor
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user