~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Andrew Bennetts
  • Date: 2007-06-08 06:33:59 UTC
  • mto: (2506.2.2 container-format)
  • mto: This revision was merged to the branch mainline in revision 2572.
  • Revision ID: andrew.bennetts@canonical.com-20070608063359-s5ps81a8i85w7by0
More progress:

 * Rename container.py to pack.py
 * Refactor bytes record reading into a separate class for ease of unit testing.
 * Start handling error conditions such as invalid content lengths in byte
   records.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2163
2163
        self.record_type = record_type
2164
2164
 
2165
2165
 
 
2166
class InvalidRecordError(ContainerError):
 
2167
 
 
2168
    _fmt = "Invalid record: %(reason)s"
 
2169
 
 
2170
    def __init__(self, reason):
 
2171
        self.reason = reason
 
2172