~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Martin Pool
  • Date: 2006-01-06 01:13:05 UTC
  • mfrom: (1534.1.4 integration)
  • Revision ID: mbp@sourcefrog.net-20060106011305-3772285d84b5cbb4
[merge] robertc

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
... except:
35
35
...   print sys.exc_type
36
36
...   print sys.exc_value
37
 
...   if hasattr(sys.exc_value, 'path'):
38
 
...     print sys.exc_value.path
 
37
...   path = getattr(sys.exc_value, 'path')
 
38
...   if path is not None:
 
39
...     print path
39
40
bzrlib.errors.NotBranchError
40
41
Not a branch: /foo/bar
41
42
/foo/bar
447
448
        BzrNewError.__init__(self)
448
449
        self.graph = graph
449
450
 
 
451
 
450
452
class NotConflicted(BzrNewError):
451
453
    """File %(filename)s is not conflicted."""
 
454
 
452
455
    def __init__(self, filename):
453
456
        BzrNewError.__init__(self)
454
457
        self.filename = filename
455
458
 
 
459
 
456
460
class MustUseDecorated(Exception):
457
461
    """A decorating function has requested its original command be used.
458
462
    
461
465
 
462
466
class MissingText(BzrNewError):
463
467
    """Branch %(base)s is missing revision %(text_revision)s of %(file_id)s"""
 
468
 
464
469
    def __init__(self, branch, text_revision, file_id):
 
470
        BzrNewError.__init__(self)
465
471
        self.branch = branch
466
472
        self.base = branch.base
467
473
        self.text_revision = text_revision
468
474
        self.file_id = file_id
 
475
 
 
476
 
 
477
class BzrBadParameter(BzrNewError):
 
478
    """Parameter %(param)s is neither unicode nor utf8."""
 
479
    
 
480
    def __init__(self, param):
 
481
        BzrNewError.__init__(self)
 
482
        self.param = param