try-catch around partial.set