diff --git a/Sources/SQLite/Core/Statement.swift b/Sources/SQLite/Core/Statement.swift index a9232bba..3507b594 100644 --- a/Sources/SQLite/Core/Statement.swift +++ b/Sources/SQLite/Core/Statement.swift @@ -203,7 +203,12 @@ extension Statement : Sequence { extension Statement : IteratorProtocol { public func next() -> [Binding?]? { - return try! step() ? Array(row) : nil + do { + return try step() ? Array(row) : nil + } catch { + assert(false, "Error in Statement.next(): \(error)") + return nil + } } }