Skip to content

Commit 11b192a

Browse files
committed
what happens if we don't wrap?
1 parent 94d020e commit 11b192a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/transformation/visitors/errors.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,9 @@ 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;
179+
// const wrapErrorObjects =
180+
// context.options.luaTarget === LuaTarget.Lua55 || context.options.luaTarget === LuaTarget.Universal;
181+
const wrapErrorObjects = false;
181182
if (wrapErrorObjects) {
182183
importLuaLibFeature(context, LuaLibFeature.ErrorObject);
183184
}

0 commit comments

Comments
 (0)