Document rethrow_uncaught/reraise
This commit is contained in:
1 parent
2b89dda5a6
commit
93bd00bba4
2 files changed
+31
-2
No files matched your search
@@ -91,6 +91,15 @@ def reraise(exception, traceback):
|
||||
raise exception, None, traceback
|
||||
""", 'blub', 'exec'))
|
||||
|
||||
reraise.__doc__ = """
|
||||
Re-raise `exception` with a `traceback` object.
|
||||
|
||||
Usage::
|
||||
|
||||
reraise(Exception, sys.exc_info()[2])
|
||||
|
||||
"""
|
||||
|
||||
# StringIO (Python 2.5 has no io module), so use io only for py3k
|
||||
try:
|
||||
from StringIO import StringIO
|
||||
|
||||
Reference in new issue
Block a user