diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2025-03-17 12:34:08 +0100 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2025-03-17 12:34:08 +0100 |
commit | a57690123ae3ce5bdd7e970690f1380e88e4eaf6 (patch) | |
tree | d526e8f545cef2b1c23978cb9ee5c94dbc9cda2c /src/lane.cpp | |
parent | d93de7ca51edea911eeecb7c8edcffe77298ed07 (diff) | |
download | lanes-a57690123ae3ce5bdd7e970690f1380e88e4eaf6.tar.gz lanes-a57690123ae3ce5bdd7e970690f1380e88e4eaf6.tar.bz2 lanes-a57690123ae3ce5bdd7e970690f1380e88e4eaf6.zip |
Raise a regular Lua error instead of throwing a C++ std::logic_error exception in Universe::UniverseGC
Diffstat (limited to 'src/lane.cpp')
-rw-r--r-- | src/lane.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lane.cpp b/src/lane.cpp index 7a5c257..5cebdfa 100644 --- a/src/lane.cpp +++ b/src/lane.cpp | |||
@@ -756,6 +756,12 @@ static void lane_main(Lane* const lane_) | |||
756 | } | 756 | } |
757 | } | 757 | } |
758 | 758 | ||
759 | if (lane_->flaggedAfterUniverseGC.load(std::memory_order_relaxed)) { | ||
760 | // let's try not to crash if the lane didn't terminate gracefully and the Universe met its end | ||
761 | // there will be leaks, but what else can we do? | ||
762 | return; | ||
763 | } | ||
764 | |||
759 | if (_errorHandlerCount) { | 765 | if (_errorHandlerCount) { |
760 | lua_remove(_L, 1); // L: retvals|error | 766 | lua_remove(_L, 1); // L: retvals|error |
761 | } | 767 | } |