/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-09-14 06:13:22 UTC
  • mfrom: (1910.12.4 BzrNewError.__str__)
  • Revision ID: pqm@pqm.ubuntu.com-20060914061322-e7009c1bca0f6df8
(Andrew Bennetts, Robert Collins, Martin Pool) Make BzrNewError more robust against usage bugs - catch TypeError for badly type format strings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
132
132
            if isinstance(s, unicode):
133
133
                return s.encode('utf8')
134
134
            return s
135
 
        except (NameError, ValueError, KeyError), e:
136
 
            return 'Unprintable exception %s: %s' \
137
 
                % (self.__class__.__name__, str(e))
 
135
        except (TypeError, NameError, ValueError, KeyError), e:
 
136
            return 'Unprintable exception %s(%r): %s' \
 
137
                % (self.__class__.__name__,
 
138
                   self.__dict__, str(e))
138
139
 
139
140
 
140
141
class BzrCheckError(BzrNewError):