     private func execQuery(statement: String, params: [Any]? = nil) throws -> RopeResult {
 
         if !self.connected {
-            self.reconnect()
+            try self.reconnect()
         }
 
         if statement.isEmpty {

    case emptyQuery
    case invalidQuery(message: String)
    case fatalError(message: String)
}

/// connection details to database

        conn = nil
    }

    private func reconnect() throws {
        if let conn = conn {            
            PQreset(conn)
            let resetStatus = PQresetPoll(conn)
            switch resetStatus {
            case PGRES_POLLING_FAILED:
                throw RopeError.reconnectFailed
            case PGRES_POLLING_OK:
                print("Reconnection succeed")
            default:
                print("Unknown Status")
                break
            }
        }
    }

