We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xcode 10.2.1 (10E1001), Swift 5.0.1
md5: 0fb6eeb45ceff944eb03fa01e6941e17
Issue Description:
Please checkout the code below.
import Foundation func test(_ work: () throws -> Void) throws { try work() } do { try test { /* Error is not handled because the enclosing function is not declared 'throws' */ defer { throw NSError(domain: "", code: 0, userInfo: nil) } print("hello") } } catch { print(error.localizedDescription) }
This code emits error that says "Error is not handled because the enclosing function is not declared 'throws'" for throwing in defer statement.
The text was updated successfully, but these errors were encountered:
You can’t throw inside a defer block. I changed the diagnostic a while ago on master to “'throw' cannot transfer control out of a defer statement”.
Sorry, something went wrong.
Thanks Srijan.
Merge pull request apple#419 from allevato/plugin-inputs
64daafb
Pass `SwiftFormatRules` sources as inputs to `generate-pipeline-plugin`.
No branches or pull requests
Environment
Xcode 10.2.1 (10E1001), Swift 5.0.1
Additional Detail from JIRA
md5: 0fb6eeb45ceff944eb03fa01e6941e17
Issue Description:
Please checkout the code below.
This code emits error that says "Error is not handled because the enclosing function is not declared 'throws'" for throwing in defer statement.
The text was updated successfully, but these errors were encountered: