~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Jonathan Riddell
  • Date: 2011-05-31 13:52:18 UTC
  • mto: This revision was merged to the branch mainline in revision 5954.
  • Revision ID: jriddell@canonical.com-20110531135218-v6fxs6pad89awidf
Make error message less specific (might not be a local disk issue) and pass through zlib error

Show diffs side-by-side

added added

removed removed

Lines of Context:
3083
3083
 
3084
3084
class DecompressCorruption(BzrError):
3085
3085
 
3086
 
    _fmt = "Corruption while decompressing pack files, this is caused by a local disk read error."
 
3086
 
 
3087
    def __init__(self, orig_error=None):
 
3088
        if orig_error is None:
 
3089
            self._fmt = "Corruption while decompressing repository file"
 
3090
        else:
 
3091
            self._fmt = "Corruption while decompressing repository file, "\
 
3092
                        "%(orig_error)s"
 
3093
        self.orig_error = orig_error
 
3094
        BzrError.__init__(self)
3087
3095
 
3088
3096
 
3089
3097
class NoSuchShelfId(BzrError):