[SR-14606] could we improve failure-to-handle-throw error message for closures? #56958
Labels
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
improvement
type checker
Area → compiler: Semantic analysis
Additional Detail from JIRA
md5: ae4b58ef6155521cb127b6974edc591b
Issue Description:
First, here's a good error message:
Yup, just about anyone can probably understand that. I wouldn't mind if it were more explicit; there are basically four solutions (`throws`, `do/catch`, `try?`, and `try!`) and a FixIt suggesting them would be great, but it's clear enough.
OK, now let's move the problem into a closure:
Experience (on Stack Overflow) shows that that just confuses people — a lot. I wonder if it might be made smart enough to say "errors thrown from here are not handled" instead? Thanks for considering this.
The text was updated successfully, but these errors were encountered: