/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: Aaron Bentley
  • Date: 2007-07-17 13:27:14 UTC
  • mfrom: (2624 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2631.
  • Revision ID: abentley@panoramicfeedback.com-20070717132714-tmzx9khmg9501k51
Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
334
334
    _fmt = "Error in command line options"
335
335
 
336
336
 
 
337
class BadIndexFormatSignature(BzrError):
 
338
 
 
339
    _fmt = "%(value)s is not an index of type %(_type)s."
 
340
 
 
341
    def __init__(self, value, _type):
 
342
        BzrError.__init__(self)
 
343
        self.value = value
 
344
        self._type = _type
 
345
 
 
346
 
 
347
class BadIndexData(BzrError):
 
348
 
 
349
    _fmt = "Error in data for index %(value)s."
 
350
 
 
351
    def __init__(self, value):
 
352
        BzrError.__init__(self)
 
353
        self.value = value
 
354
 
 
355
 
 
356
class BadIndexDuplicateKey(BzrError):
 
357
 
 
358
    _fmt = "The key '%(key)s' is already in index '%(index)s'."
 
359
 
 
360
    def __init__(self, key, index):
 
361
        BzrError.__init__(self)
 
362
        self.key = key
 
363
        self.index = index
 
364
 
 
365
 
 
366
class BadIndexKey(BzrError):
 
367
 
 
368
    _fmt = "The key '%(key)s' is not a valid key."
 
369
 
 
370
    def __init__(self, key):
 
371
        BzrError.__init__(self)
 
372
        self.key = key
 
373
 
 
374
 
 
375
class BadIndexOptions(BzrError):
 
376
 
 
377
    _fmt = "Could not parse options for index %(value)s."
 
378
 
 
379
    def __init__(self, value):
 
380
        BzrError.__init__(self)
 
381
        self.value = value
 
382
 
 
383
 
 
384
class BadIndexValue(BzrError):
 
385
 
 
386
    _fmt = "The value '%(value)s' is not a valid value."
 
387
 
 
388
    def __init__(self, value):
 
389
        BzrError.__init__(self)
 
390
        self.value = value
 
391
 
 
392
 
337
393
class BadOptionValue(BzrError):
338
394
 
339
395
    _fmt = """Bad value "%(value)s" for option "%(name)s"."""
349
405
 
350
406
# XXX: Should be unified with TransportError; they seem to represent the
351
407
# same thing
 
408
# RBC 20060929: I think that unifiying with TransportError would be a mistake
 
409
# - this is finer than a TransportError - and more useful as such. It 
 
410
# differentiates between 'transport has failed' and 'operation on a transport
 
411
# has failed.'
352
412
class PathError(BzrError):
353
413
    
354
414
    _fmt = "Generic path error: %(path)r%(extra)s)"
457
517
        PathError.__init__(self, url, extra=extra)
458
518
 
459
519
 
 
520
class ReadError(PathError):
 
521
    
 
522
    _fmt = """Error reading from %(path)r."""
 
523
 
 
524
 
460
525
class ShortReadvError(PathError):
461
526
 
462
527
    _fmt = ("readv() read %(actual)s bytes rather than %(length)s bytes"
1551
1616
        self.text_revision = text_revision
1552
1617
        self.file_id = file_id
1553
1618
 
1554
 
 
1555
1619
class DuplicateFileId(BzrError):
1556
1620
 
1557
1621
    _fmt = "File id {%(file_id)s} already exists in inventory as %(entry)s"