~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: John Arbash Meinel
  • Date: 2008-03-17 20:11:30 UTC
  • mto: This revision was merged to the branch mainline in revision 3532.
  • Revision ID: john@arbash-meinel.com-20080317201130-254scn9jqanfvc92
Raise a clear error about the offending filename when there is a filename with bad characters.
Related to bug #77657

Show diffs side-by-side

added added

removed removed

Lines of Context:
800
800
        BzrError.__init__(self, filename=filename, kind=kind)
801
801
 
802
802
 
 
803
class BadFilenameEncoding(BzrError):
 
804
 
 
805
    _fmt = ('Filename %(filename)r is not valid in your current filesystem'
 
806
            ' encoding %(fs_encoding)s')
 
807
 
 
808
    def __init__(self, filename, fs_encoding):
 
809
        BzrError.__init__(self)
 
810
        self.filename = filename
 
811
        self.fs_encoding = fs_encoding
 
812
 
 
813
 
803
814
class ForbiddenControlFileError(BzrError):
804
815
 
805
816
    _fmt = 'Cannot operate on "%(filename)s" because it is a control file'