Skip to content
New issue

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

[SR-6845] RecoverableError's attemptRecovery(optionIndex:resultHandler:) takes a non-escaping closure #49394

Closed
CharlesJS opened this issue Jan 26, 2018 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@CharlesJS
Copy link

Previous ID SR-6845
Radar None
Original Reporter @CharlesJS
Type Bug
Status Resolved
Resolution Duplicate
Environment

Apple Swift version 4.1 (swiftlang-902.0.34 clang-902.0.30)

Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee None
Priority Medium

md5: b26d01384772e1458926a80bfec015a3

duplicates:

Issue Description:

The RecoverableError protocol contains the following method:

func attemptRecovery(optionIndex recoveryOptionIndex: Int, resultHandler handler: (Bool) -> Void)

This is analogous to -attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo: from the old NSErrorRecoveryAttempting protocol, and is meant to make it possible to recover from errors asynchronously.

Unfortunately, the method takes a non-escaping closure, which prevents this usage, making the method rather useless, since it no longer can do any job that couldn't already be handled by the synchronous attemptRecovery(optionIndex: ) method.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Projects
None yet
Development

No branches or pull requests

1 participant