Changeset 3528:f05eb4b4ebd1 in livinglogic.python.xist
- Timestamp:
- 07/18/08 23:28:33 (11 years ago)
- Author:
- Walter Doerwald <walter@…>
- Branch:
- default
- Message:
-
Avoid duplication locations in the exception output.
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
r3527
|
r3528
|
|
116 | 116 | exc = self |
117 | 117 | while isinstance(exc, Error): |
118 | | path.append(str(exc.location)) |
| 118 | if not path or path[-1] is not exc.location: |
| 119 | path.append(exc.location) |
119 | 120 | exc = exc.cause |
120 | 121 | name = exc.__class__.__name__ |
… |
… |
|
122 | 123 | if module != "exceptions": |
123 | 124 | name = "%s.%s" % (module, name) |
124 | | return "%s in %s: %s" % (name, ": in ".join(path), exc) |
| 125 | return "%s %s %s" % (name, "".join("in %s:" % location for location in path), exc) |
125 | 126 | |
126 | 127 | |