Revision 3606
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/exc.py | ||
---|---|---|
36 | 36 |
except AttributeError: return '' |
37 | 37 |
return ''.join(get_traceback_str(t) for t in tracebacks) |
38 | 38 |
|
39 |
def e_msg(e): return strings.ustr(e.args[0]).rstrip() |
|
39 |
def e_msg(e): |
|
40 |
assert len(e.args) == 1 |
|
41 |
assert util.is_str(e.args[0]) |
|
42 |
return strings.ustr(e.args[0]).rstrip() |
|
40 | 43 |
|
41 | 44 |
def e_str(e): return e.__class__.__name__+': '+e_msg(e) |
42 | 45 |
|
Also available in: Unified diff
exc.py: e_msg(): Added assertions to check that e.args is compatible with this function