Home made exception hierarcy - 1
examples/exceptions/hierarchy1.py
import colors as cl def main(): print("start") try: cl.green() except Exception as err: print(err) print(type(err).__name__) print("done") main()
start Hulk MyGreenError done
import colors as cl def main(): print("start") try: cl.green() except Exception as err: print(err) print(type(err).__name__) print("done") main()
start Hulk MyGreenError done