# # # add_dir "tests/exception-in-luaext" # # add_file "tests/exception-in-luaext/__driver__.lua" # content [5631966eeda0f2b6d930e9d43e8d9c643878692d] # # add_file "tests/exception-in-luaext/evilrc.lua" # content [3deb51abbf5ac9d21f63606b0174d918ea6985dc] # # patch "NEWS" # from [4fb3a20cd2d273bd91109e1937a104f8a1e856c7] # to [d42378aa2a0b394bbcb6b48de75cdf392f06992c] # ============================================================ --- tests/exception-in-luaext/__driver__.lua 5631966eeda0f2b6d930e9d43e8d9c643878692d +++ tests/exception-in-luaext/__driver__.lua 5631966eeda0f2b6d930e9d43e8d9c643878692d @@ -0,0 +1,9 @@ +mtn_setup() + +get("evilrc.lua") + +-- so there will be a revision to call our hook function on +addfile("foo", "bar") +commit() + +check(mtn("heads", "--rcfile", "evilrc.lua"), 0, false, false) ============================================================ --- tests/exception-in-luaext/evilrc.lua 3deb51abbf5ac9d21f63606b0174d918ea6985dc +++ tests/exception-in-luaext/evilrc.lua 3deb51abbf5ac9d21f63606b0174d918ea6985dc @@ -0,0 +1,4 @@ +function get_revision_cert_trust(a, b, c) + pcall(includedir, "/this/fnord/path/does/not/exists") + return true +end ============================================================ --- NEWS 4fb3a20cd2d273bd91109e1937a104f8a1e856c7 +++ NEWS d42378aa2a0b394bbcb6b48de75cdf392f06992c @@ -19,6 +19,9 @@ xxx xxx xx xx:xx:xx UTC 2009 Bugs fixed + - Exceptions in Lua extension functions will now be converted into a + Lua error catchable with pcall, instead of causing a horrible crash. + Internal