examples/exceptions/raise.py
#!/usr/bin/env python
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)