mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-26 07:02:11 +00:00
#1208 Handle forced unwind exception (e.g. during pthread termination)
* #1208 Bugfix thread kill wihile running pybind11 module * #1208 Bugfix missing space after catch
This commit is contained in:
parent
09330b94ea
commit
69dc380c0d
@ -41,6 +41,11 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__GNUG__) && !defined(__clang__)
|
||||||
|
#include <cxxabi.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include "attr.h"
|
#include "attr.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "detail/class.h"
|
#include "detail/class.h"
|
||||||
@ -663,6 +668,10 @@ protected:
|
|||||||
} catch (error_already_set &e) {
|
} catch (error_already_set &e) {
|
||||||
e.restore();
|
e.restore();
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
#if defined(__GNUG__) && !defined(__clang__)
|
||||||
|
} catch ( abi::__forced_unwind& ) {
|
||||||
|
throw;
|
||||||
|
#endif
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
/* When an exception is caught, give each registered exception
|
/* When an exception is caught, give each registered exception
|
||||||
translator a chance to translate it to a Python exception
|
translator a chance to translate it to a Python exception
|
||||||
|
Loading…
Reference in New Issue
Block a user