Lua exception handling test
[folly.git] / folly / experimental / exception_tracer / ExceptionStackTraceLib.cpp
index 167cd400b8e33a45898b435ccb5af744d66cdf71..57f0fd688648664576c2aaf76e3724c4b98a7bcb 100644 (file)
@@ -88,7 +88,8 @@ struct Initializer {
       // exceptions.
       // In the rethrow case, we've already popped the exception off the
       // caught stack, so we don't do anything here.
-      if (top->handlerCount == 1) {
+      // For Lua interop, we see the handlerCount = 0
+      if ((top->handlerCount == 1) || (top->handlerCount == 0)) {
         if (!caughtExceptions.pop()) {
           activeExceptions.clear();
           invalid = true;