~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Aaron Bentley
  • Date: 2008-06-26 05:10:31 UTC
  • mto: This revision was merged to the branch mainline in revision 3514.
  • Revision ID: aaron@aaronbentley.com-20080626051031-ylyzlwa3t41dd3it
Add support for branch-associated locations

Show diffs side-by-side

added added

removed removed

Lines of Context:
2731
2731
        BzrError.__init__(self, alias_name=alias_name)
2732
2732
 
2733
2733
 
 
2734
class DirectoryLookupFailure(BzrError):
 
2735
    """Base type for lookup errors."""
 
2736
 
 
2737
    pass
 
2738
 
 
2739
 
 
2740
class InvalidLocationAlias(DirectoryLookupFailure):
 
2741
 
 
2742
    _fmt = '"%(alias_name)s" is not a valid location alias.'
 
2743
 
 
2744
    def __init__(self, alias_name):
 
2745
        DirectoryLookupFailure.__init__(self, alias_name=alias_name)
 
2746
 
 
2747
 
 
2748
class UnsetLocationAlias(DirectoryLookupFailure):
 
2749
 
 
2750
    _fmt = 'No %(alias_name)s location assigned.'
 
2751
 
 
2752
    def __init__(self, alias_name):
 
2753
        DirectoryLookupFailure.__init__(self, alias_name=alias_name[1:])
 
2754
 
 
2755
 
2734
2756
class CannotBindAddress(BzrError):
2735
2757
 
2736
2758
    _fmt = 'Cannot bind address "%(host)s:%(port)i": %(orig_error)s.'