finishEnumeratingWithError(_:)
Finishes a search enumeration by sending an error to the framework.
Declaration
func finishEnumeratingWithError(_ error: any Error)Discussion
Finishing with an error causes the system to stop requesting additional pages of results. The system doesn’t retry after you call this method. If an error is potentially recoverable, you can perform your own retry in your implementation of enumerateSearchResults(for:startingAt:) and continue if successful, or end the query by calling this method.