user
05/14/2017, 2:12 PMthrow
call (or a call to a function that throws
) either have throws
in their signature, or change their contents to internally handle the exception.
I did specify that lambdas (I called them closures) can be declared with throws
, but now I realize that's not enough. I'll update my proposal; Swift also has a rethrows
keywords to handle this situation, so that if and only if the lambda's contents throws an exception, the lambda is treated as if it also throws.