Skip to content

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

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

fix try/finally not re-throwing errors when there is no catch clause#1692
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.

…ypeScriptToLua#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.
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