examples/exceptions/raise.py
from __future__ import print_function

def some():
    print("entering some")
    raise Exception("Some Error")
    print("code after raise")

try:
    some()
except Exception as e:
    print("Exception received")
    print(e)