/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: Alexander Belchenko
  • Date: 2007-01-24 10:45:08 UTC
  • mfrom: (2236 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2242.
  • Revision ID: bialix@ukr.net-20070124104508-mwiux3wozhk8939k
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
541
541
 
542
542
    _fmt = "Lock error: %(message)s"
543
543
 
 
544
    internal_error = True
 
545
 
544
546
    # All exceptions from the lock/unlock functions should be from
545
547
    # this exception class.  They will be translated as necessary. The
546
548
    # original exception is available as e.original_error
583
585
 
584
586
    _fmt = "%(obj)r is not locked"
585
587
 
586
 
    internal_error = True
587
 
 
588
588
    # this can indicate that any particular object is not locked; see also
589
589
    # LockNotHeld which means that a particular *lock* object is not held by
590
590
    # the caller -- perhaps they should be unified.
611
611
class LockContention(LockError):
612
612
 
613
613
    _fmt = "Could not acquire lock %(lock)s"
614
 
    # TODO: show full url for lock, combining the transport and relative bits?
 
614
    # TODO: show full url for lock, combining the transport and relative
 
615
    # bits?
 
616
 
 
617
    internal_error = False
615
618
    
616
619
    def __init__(self, lock):
617
620
        self.lock = lock
621
624
 
622
625
    _fmt = "Lock was broken while still open: %(lock)s - check storage consistency!"
623
626
 
 
627
    internal_error = False
 
628
 
624
629
    def __init__(self, lock):
625
630
        self.lock = lock
626
631
 
629
634
 
630
635
    _fmt = "Lock was released and re-acquired before being broken: %(lock)s: held by %(holder)r, wanted to break %(target)r"
631
636
 
 
637
    internal_error = False
 
638
 
632
639
    def __init__(self, lock, holder, target):
633
640
        self.lock = lock
634
641
        self.holder = holder
639
646
 
640
647
    _fmt = "Lock not held: %(lock)s"
641
648
 
 
649
    internal_error = False
 
650
 
642
651
    def __init__(self, lock):
643
652
        self.lock = lock
644
653
 
929
938
    
930
939
    _fmt = "Knit error"
931
940
 
 
941
    internal_error = True
 
942
 
932
943
 
933
944
class KnitHeaderError(KnitError):
934
945
 
950
961
        self.how = how
951
962
 
952
963
 
 
964
class KnitIndexUnknownMethod(KnitError):
 
965
    """Raised when we don't understand the storage method.
 
966
 
 
967
    Currently only 'fulltext' and 'line-delta' are supported.
 
968
    """
 
969
    
 
970
    _fmt = ("Knit index %(filename)s does not have a known method"
 
971
            " in options: %(options)r")
 
972
 
 
973
    def __init__(self, filename, options):
 
974
        KnitError.__init__(self)
 
975
        self.filename = filename
 
976
        self.options = options
 
977
 
 
978
 
953
979
class NoSuchExportFormat(BzrError):
954
980
    
955
981
    _fmt = "Export format %(format)r not supported"