~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Martin Pool
  • Date: 2005-09-07 09:51:05 UTC
  • Revision ID: mbp@sourcefrog.net-20050907095105-9699d69050ff0f9d
- better error display

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
# exceptions 
25
25
class BzrError(StandardError):
26
26
    def __str__(self):
27
 
        if len(self.args) == 2:
 
27
        if len(self.args) == 1:
 
28
            return self.args[0]
 
29
        elif len(self.args) == 2:
28
30
            # further explanation or suggestions
29
31
            return '\n  '.join([self.args[0]] + self.args[1])
30
32
        else: