There was an error while loading. Please reload this page.
1 parent 11b192a commit 56281f2Copy full SHA for 56281f2
1 file changed
src/transformation/visitors/errors.ts
@@ -176,9 +176,8 @@ export const transformTryStatement: FunctionVisitor<ts.TryStatement> = (statemen
176
// preserve `throw undefined` semantics, route through xpcall with a message
177
// handler that wraps nil into a sentinel, and unwrap before the user catch.
178
// See: https://www.lua.org/manual/5.5/manual.html#8.1
179
- // const wrapErrorObjects =
180
- // context.options.luaTarget === LuaTarget.Lua55 || context.options.luaTarget === LuaTarget.Universal;
181
- const wrapErrorObjects = false;
+ const wrapErrorObjects =
+ context.options.luaTarget === LuaTarget.Lua55 || context.options.luaTarget === LuaTarget.Universal;
182
if (wrapErrorObjects) {
183
importLuaLibFeature(context, LuaLibFeature.ErrorObject);
184
}
0 commit comments