Add try-except for switch function