[swift-users] Asynchronous error recovering with RecoverableError
Elia Cereda
eliacereda at gmail.com
Thu Mar 23 04:07:05 CDT 2017
I'd like to bump this issue, since it has been some time and it hasn't been addressed.
Thanks,
Elia Cereda
> Il giorno 03 mar 2017, alle ore 21:33, Elia Cereda <eliacereda at gmail.com> ha scritto:
>
> I’m wondering why the resultHandler block on RecoverableError.attemptRecovery(optionIndex, resultHandler:) is not marked @escaping?
>
> I’m trying to invoke some recovering code that executes asynchronously, then reports if it was successful or not and I thought that this was the right strategy. As far as I can tell, without @escaping that method loses all it’s purpose and becomes essentially equivalent to attemptRecovery(optionIndex:).
>
> So, I’d like to ask.
> 1. Is it a bug or that method is non-escaping on purpose?
> 2. If it is a bug, is there a workaround that can be applied pending a fix in a future version of Swift?
> 3. If it was a deliberate decision, what's the supported method of asynchronously invoking error recovery code?
>
> Seeing that this wasn’t changed in Xcode 8.3b2, I think it unlikely that this was an oversight.
>
> Thanks,
> Elia Cereda
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20170323/fa1c3466/attachment.html>
More information about the swift-users
mailing list