Is it possible to throw an error inside of the inTransaction block? Like:
self.queue!.inTransaction { db, rollback in
do {
let rs = try db.executeQuery(some_query_here, values: nil)
while rs.next() {
// do smth here
}
rs.close()
} catch {
rollback.pointee = true
// THROW ERROR HERE
}
}
So basically I want to throw an error in catch block. But unfortunately inTransaction method is not throwable. Can I do something here?
Karl-Liebknecht-Str.32, 10178 Berlin, Germany
Verve Group Europe GmbH (previously PubNative GmbH) | Amtsgericht Charlottenburg (Berlin): HRB 160880 B | Managing Directors: Ionut Ciobotaru, Sameer Sondhi | VAT ID: DE296557765