Skip to content

Commit 56281f2

Browse files
committed
revert to wrapping
1 parent 11b192a commit 56281f2

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/transformation/visitors/errors.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,8 @@ export const transformTryStatement: FunctionVisitor<ts.TryStatement> = (statemen
176176
// preserve `throw undefined` semantics, route through xpcall with a message
177177
// handler that wraps nil into a sentinel, and unwrap before the user catch.
178178
// 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;
179+
const wrapErrorObjects =
180+
context.options.luaTarget === LuaTarget.Lua55 || context.options.luaTarget === LuaTarget.Universal;
182181
if (wrapErrorObjects) {
183182
importLuaLibFeature(context, LuaLibFeature.ErrorObject);
184183
}

0 commit comments

Comments
 (0)