Don't add code to codeData if exception occurs