From: Alberto Berti Date: Sun, 22 Feb 2009 18:02:52 +0000 (-0700) Subject: Raise a more explanatory exception for errors encountered during backup processing. X-Git-Tag: allmydata-tahoe-1.4.0~152 X-Git-Url: https://git.rkrishnan.org/%5B/frontends/index.php?a=commitdiff_plain;h=c54fdd61b030f50b827f29a287cdb28afa15c463;p=tahoe-lafs%2Ftahoe-lafs.git Raise a more explanatory exception for errors encountered during backup processing. --- diff --git a/src/allmydata/scripts/tahoe_backup.py b/src/allmydata/scripts/tahoe_backup.py index 6b829c02..bbde7623 100644 --- a/src/allmydata/scripts/tahoe_backup.py +++ b/src/allmydata/scripts/tahoe_backup.py @@ -113,6 +113,9 @@ def directory_is_changed(a, b): return True return False +class BackupProcessingError(Exception): + pass + class BackerUpper: def __init__(self, options): self.options = options @@ -248,7 +251,7 @@ class BackerUpper: newfilecap, metadata = self.upload(childpath) newdircontents[child] = ("filenode", newfilecap, metadata) else: - raise RuntimeError("how do I back this up?") + raise BackupProcessingError("Cannot backup this file %r" % childpath) if (olddircap and olddircontents is not None