/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Andrew Bennetts
  • Date: 2008-10-29 01:19:46 UTC
  • mfrom: (3786.3.3 Unify error decoding)
  • mto: This revision was merged to the branch mainline in revision 3807.
  • Revision ID: andrew.bennetts@canonical.com-20081029011946-m408t8eco1klvoio
Merge loom thread (includes latest bzr.dev and new tests in bt.test_remote).

Show diffs side-by-side

added added

removed removed

Lines of Context:
134
134
            s = str(s)
135
135
        return s
136
136
 
 
137
    def __repr__(self):
 
138
        return '%s(%s)' % (self.__class__.__name__, str(self))
 
139
 
137
140
    def _get_format_string(self):
138
141
        """Return format string for this exception or None"""
139
142
        fmt = getattr(self, '_fmt', None)
1424
1427
        self.how = how
1425
1428
 
1426
1429
 
 
1430
class SHA1KnitCorrupt(KnitCorrupt):
 
1431
 
 
1432
    _fmt = ("Knit %(filename)s corrupt: sha-1 of reconstructed text does not "
 
1433
        "match expected sha-1. key %(key)s expected sha %(expected)s actual "
 
1434
        "sha %(actual)s")
 
1435
 
 
1436
    def __init__(self, filename, actual, expected, key, content):
 
1437
        KnitError.__init__(self)
 
1438
        self.filename = filename
 
1439
        self.actual = actual
 
1440
        self.expected = expected
 
1441
        self.key = key
 
1442
        self.content = content
 
1443
 
 
1444
 
1427
1445
class KnitDataStreamIncompatible(KnitError):
1428
1446
    # Not raised anymore, as we can convert data streams.  In future we may
1429
1447
    # need it again for more exotic cases, so we're keeping it around for now.