Save pulse charge in the sample logs

Refs #6871
Add an exception handler for std::invalid_argument

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

Refs #6871
Merge branch 'feature/6871_save_proton_charge' into develop