Michele De Nardi
Michele De Nardi

Reputation: 636

Error on NSFetchRequest inside "do"

In my Swift 2 OS X app I have this error:

enter image description here

Can anyone help me to resolve it?

Upvotes: 0

Views: 23

Answers (1)

Eric Aya
Eric Aya

Reputation: 70113

"Errors thrown from here are not handled" because indeed there's no catch following your do. You should add something like this:

do {
    ...
    for user in result {
        ...
    }
} catch let error as NSError {
    print(error)
}

Upvotes: 2

Related Questions