Converts several try/except to the newer style