raise + error types code example
Example 1: raise python
# Raise is used to cause an error
raise(Exception("Put whatever you want here!"))
raise(TypeError)
Example 2: type error in python
try:
...
except SomeException:
tb = sys.exc_info()[2]
raise OtherException(...).with_traceback(tb)