~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/groupcompress.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:
466
466
                # Grab and cache the raw bytes for this entry
467
467
                # and break the ref-cycle with _manager since we don't need it
468
468
                # anymore
469
 
                self._manager._prepare_for_extract()
 
469
                try:
 
470
                    self._manager._prepare_for_extract()
 
471
                except zlib.error as value:
 
472
                    raise errors.DecompressCorruption("zlib: " + str(value))
470
473
                block = self._manager._block
471
474
                self._bytes = block.extract(self.key, self._start, self._end)
472
475
                # There are code paths that first extract as fulltext, and then