enzingerm / snapborg

Synchronize snapper snapshots to a borg repository
GNU General Public License v3.0
35 stars 6 forks source link

Quick code cleanup: backup error handling #17

Open jrabinow opened 2 years ago

jrabinow commented 2 years ago

A few changes and adjustments to error handing in commands/snapborg:backup function. I'm afraid it's still not perfect: a classic issue I see with exceptions is that they are caught too soon/hidden. While it makes sense to catch things in this context (we want to do all backups regardless of individual failures), borg's error message itself should be logged, ideally with the traceback pointing to launch_borg.

I don't want to spend too much time on this aspect of the code so this will have to do.