~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: John Arbash Meinel
  • Date: 2010-11-05 20:54:32 UTC
  • mfrom: (5526 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5527.
  • Revision ID: john@arbash-meinel.com-20101105205432-rmyozu8sthyhmri8
Merge bzr.dev to resolve bzr-2.3.txt (aka NEWS)

Show diffs side-by-side

added added

removed removed

Lines of Context:
723
723
                    self.bzrdir.open_repository()
724
724
                except NoRepositoryPresent:
725
725
                    self.detail = ''
 
726
                except Exception:
 
727
                    # Just ignore unexpected errors.  Raising arbitrary errors
 
728
                    # during str(err) can provoke strange bugs.  Concretely
 
729
                    # Launchpad's codehosting managed to raise NotBranchError
 
730
                    # here, and then get stuck in an infinite loop/recursion
 
731
                    # trying to str() that error.  All this error really cares
 
732
                    # about that there's no working repository there, and if
 
733
                    # open_repository() fails, there probably isn't.
 
734
                    self.detail = ''
726
735
                else:
727
736
                    self.detail = ': location is a repository'
728
737
            else:
2945
2954
        self.user_encoding = osutils.get_user_encoding()
2946
2955
 
2947
2956
 
 
2957
class NoSuchConfig(BzrError):
 
2958
 
 
2959
    _fmt = ('The "%(config_id)s" configuration does not exist.')
 
2960
 
 
2961
    def __init__(self, config_id):
 
2962
        BzrError.__init__(self, config_id=config_id)
 
2963
 
 
2964
 
 
2965
class NoSuchConfigOption(BzrError):
 
2966
 
 
2967
    _fmt = ('The "%(option_name)s" configuration option does not exist.')
 
2968
 
 
2969
    def __init__(self, option_name):
 
2970
        BzrError.__init__(self, option_name=option_name)
 
2971
 
 
2972
 
2948
2973
class NoSuchAlias(BzrError):
2949
2974
 
2950
2975
    _fmt = ('The alias "%(alias_name)s" does not exist.')