<@U3T6LDWTD> commented on <@U3T6LDWTD>’s file <htt...
# language-proposals
u
@benleggiero commented on @benleggiero’s file https://kotlinlang.slack.com/files/T09229ZC6/F04AVNRBLNP: @ilya.gorbunov this change would make it so that the Kotlin stdlib would not compile until all functions that contain a
throw
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.