Tighten up try/except block to match neighbouring style