Error checking exception inside catch