added exception for cpp