Skip to content

fix try/finally not re-throwing errors when there is no catch clause#1689

Closed
RealColdFry wants to merge 2 commits intoTypeScriptToLua:masterfrom
RealColdFry:fix/try-finally-rethrow
Closed

fix try/finally not re-throwing errors when there is no catch clause#1689
RealColdFry wants to merge 2 commits intoTypeScriptToLua:masterfrom
RealColdFry:fix/try-finally-rethrow

Conversation

@RealColdFry
Copy link

Fixes #1667

When a try block had a finally but no catch, pcall's error result was discarded, silently swallowing the exception. Now the error is captured and re-thrown after the finally block executes.

…1667)

When a try block had a finally but no catch, pcall's error result was
discarded, silently swallowing the exception. Now the error is captured
and re-thrown after the finally block executes.
@RealColdFry RealColdFry force-pushed the fix/try-finally-rethrow branch from 19e4def to 9e25767 Compare March 18, 2026 19:32
@RealColdFry RealColdFry force-pushed the fix/try-finally-rethrow branch from c01979c to 1afe73b Compare March 18, 2026 19:50
@RealColdFry RealColdFry deleted the fix/try-finally-rethrow branch March 18, 2026 19:53
@RealColdFry RealColdFry restored the fix/try-finally-rethrow branch March 18, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

try finally without catch should throw error in try block if no return in finally

1 participant