From: Dan Melnic Date: Tue, 18 Jul 2017 01:50:41 +0000 (-0700) Subject: Lua exception handling test X-Git-Tag: v2017.07.17.01~6 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=3179d4464f4d211d18bb784a7d6c97390035e266;p=folly.git Lua exception handling test Summary: Lua exception handling test - start with the failing test first - code from D5431445 Reviewed By: yfeldblum Differential Revision: D5432254 fbshipit-source-id: 87f5934f28ac6ef7b55314acb3c150b9ccf6c799 --- diff --git a/folly/experimental/exception_tracer/ExceptionStackTraceLib.cpp b/folly/experimental/exception_tracer/ExceptionStackTraceLib.cpp index 167cd400..57f0fd68 100644 --- a/folly/experimental/exception_tracer/ExceptionStackTraceLib.cpp +++ b/folly/experimental/exception_tracer/ExceptionStackTraceLib.cpp @@ -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;