~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Ian Clatworthy
  • Date: 2008-12-23 07:47:43 UTC
  • mfrom: (3916 +trunk)
  • mto: (3586.1.28 views-ui)
  • mto: This revision was merged to the branch mainline in revision 4030.
  • Revision ID: ian.clatworthy@canonical.com-20081223074743-t942gwabt937o693
merge bzr.dev r3916

Show diffs side-by-side

added added

removed removed

Lines of Context:
1496
1496
 
1497
1497
    internal_error = True
1498
1498
 
1499
 
    _fmt = ("Pack files have changed, reload and retry. %(orig_error)s")
 
1499
    _fmt = ("Pack files have changed, reload and retry. context: %(context)s"
 
1500
            " %(orig_error)s")
1500
1501
 
1501
 
    def __init__(self, reload_occurred, exc_info):
1502
 
        """create a new RestartWithNewPacks error.
 
1502
    def __init__(self, context, reload_occurred, exc_info):
 
1503
        """create a new RetryWithNewPacks error.
1503
1504
 
1504
1505
        :param reload_occurred: Set to True if we know that the packs have
1505
1506
            already been reloaded, and we are failing because of an in-memory
1518
1519
        #       RetryWithNewPacks also not being caught
1519
1520
 
1520
1521
 
 
1522
class RetryAutopack(RetryWithNewPacks):
 
1523
    """Raised when we are autopacking and we find a missing file.
 
1524
 
 
1525
    Meant as a signaling exception, to tell the autopack code it should try
 
1526
    again.
 
1527
    """
 
1528
 
 
1529
    internal_error = True
 
1530
 
 
1531
    _fmt = ("Pack files have changed, reload and try autopack again."
 
1532
            " context: %(context)s %(orig_error)s")
 
1533
 
 
1534
 
1521
1535
class NoSuchExportFormat(BzrError):
1522
1536
    
1523
1537
    _fmt = "Export format %(format)r not supported"
2906
2920
    def __init__(self, msg):
2907
2921
        self.msg = msg
2908
2922
 
 
2923
 
2909
2924
class ShelfCorrupt(BzrError):
2910
2925
 
2911
2926
    _fmt = "Shelf corrupt."