         return try execQuery(statement: statement, params: params)
     }
 
-    private func execQuery(statement: String, params: [Any]? = nil) throws -> RopeResult? {
+    private func execQuery(statement: String, params: [Any]? = nil) throws -> RopeResult {
         if statement.isEmpty {
             throw RopeError.emptyQuery
         }
 
         guard let params = params else {
             guard let res = PQexec(self.conn, statement) else {
-                try failWithError(); return nil
+                throw failWithError()
             }
 
             return try validateQueryResultStatus(res)


    private func close() throws {
        guard self.connected else {
            try failWithError(); return
        }

        PQfinish(conn)
        conn = nil
    }

    private func failWithError(_ conn: OpaquePointer? = nil) throws {
        let message = String(cString: PQerrorMessage(conn ?? self.conn))
        throw RopeError.connectionFailed(message: message)
    }
}

            values[idx] = UnsafePointer<Int8>(OpaquePointer(tempValues.last!))
        }

        guard let res = PQexecParams(self.conn, statement, Int32(params.count), nil, values, nil, nil, Int32(0)) else {
            throw failWithError()
        }

        return try validateQueryResultStatus(res)
