add exception to cpp output