try/except error handling around cc