~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-06-02 16:57:09 UTC
  • mfrom: (5927.2.8 598572-zlib-error)
  • Revision ID: pqm@pqm.ubuntu.com-20110602165709-ry228rc95pgnj3g9
(jr) Display error when zlib corruption occurs rather than a backtrace
 (Jonathan Riddell)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3081
3081
    _fmt = "Shelf corrupt."
3082
3082
 
3083
3083
 
 
3084
class DecompressCorruption(BzrError):
 
3085
 
 
3086
    _fmt = "Corruption while decompressing repository file%(orig_error)s"
 
3087
 
 
3088
    def __init__(self, orig_error=None):
 
3089
        if orig_error is not None:
 
3090
            self.orig_error = ", %s" % (orig_error,)
 
3091
        else:
 
3092
            self.orig_error = ""
 
3093
        BzrError.__init__(self)
 
3094
 
 
3095
 
3084
3096
class NoSuchShelfId(BzrError):
3085
3097
 
3086
3098
    _fmt = 'No changes are shelved with id "%(shelf_id)d".'