Revision 3604
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/exc.py | ||
---|---|---|
41 | 41 |
def e_str(e): return e.__class__.__name__+': '+e_msg(e) |
42 | 42 |
|
43 | 43 |
def add_msg(e, msg): |
44 |
e.args = (strings.ensure_newl(strings.ustr(e))+strings.ustr(msg),)
|
|
44 |
e.args = (e_msg(e)+'\n'+strings.ustr(msg),)
|
|
45 | 45 |
|
46 |
def repl_msg(e, **repls): e.args = (strings.ustr(e) % repls,)
|
|
46 |
def repl_msg(e, **repls): e.args = (e_msg(e) % repls,)
|
|
47 | 47 |
|
48 | 48 |
def e_ct_exit_status(e_ct): return min(e_ct, 255) |
49 | 49 |
|
Also available in: Unified diff
exc.py: Use new Unicode-safe e_msg() instead of strings.ustr() on exceptions