---
title: "finishEnumeratingWithError(_:)"
framework: fileprovider
role: symbol
role_heading: Instance Method
path: "fileprovider/nsfileproviderenumerationobserver/finishenumeratingwitherror(_:)"
---

# finishEnumeratingWithError(_:)

Tells the observer that an error occurred during item enumeration.

## Declaration

```swift
func finishEnumeratingWithError(_ error: any Error)
```

## Mentioned in

Defining Your File Provider’s Content

## See Also

### Observing Item Enumeration

- [didEnumerate(_:)](fileprovider/nsfileproviderenumerationobserver/didenumerate(_:).md)
- [finishEnumerating(upTo:)](fileprovider/nsfileproviderenumerationobserver/finishenumerating(upto:).md)
- [suggestedPageSize](fileprovider/nsfileproviderenumerationobserver/suggestedpagesize.md)
