~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Robert Collins
  • Date: 2009-07-07 03:40:29 UTC
  • mto: This revision was merged to the branch mainline in revision 4524.
  • Revision ID: robertc@robertcollins.net-20090707034029-dg8llays6d1py3un
Add more generic InconsistentDeltaDelta error class for use when the exact cause of an inconsistent delta isn't trivially accessible.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2162
2162
        self.reason = reason
2163
2163
 
2164
2164
 
 
2165
class InconsistentDeltaDelta(InconsistentDelta):
 
2166
    """Used when we get a delta that is not valid."""
 
2167
 
 
2168
    _fmt = ("An inconsistent delta was supplied: %(delta)r"
 
2169
            "\nreason: %(reason)s")
 
2170
 
 
2171
    def __init__(self, delta, reason):
 
2172
        BzrError.__init__(self)
 
2173
        self.delta = delta
 
2174
        self.reason = reason
 
2175
 
 
2176
 
2165
2177
class UpgradeRequired(BzrError):
2166
2178
 
2167
2179
    _fmt = "To use this feature you must upgrade your branch at %(path)s."