You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
7 lines
275 B
Python
7 lines
275 B
Python
9 years ago
|
def raise_with_traceback(exc_type, traceback, *args, **kwargs):
|
||
|
"""
|
||
|
Raise a new exception of type `exc_type` with an existing `traceback`. All
|
||
|
additional (keyword-)arguments are forwarded to `exc_type`
|
||
|
"""
|
||
|
raise exc_type(*args, **kwargs), None, traceback
|