See linked issue on hpic2: https://github.com/lcpp-org/hpic2/issues/182 The error message should include some context, such as the particle's original energy, etc.