Save pulse charge in the sample logs

Refs #6871
Add exception handler for std::invalid_argument

Add an exception handler so that we'll get some better log messages if
the live listener background thread ever throws std::invalid_argument.

Refs #6871
Merge remote branch 'origin/feature/6871_save_proton_charge'