Condense these godawful try-catch blocks