# -*- coding: utf-8 -*- """ Created on Wed Sep 21 13:55:14 2016 @author: progprim """ def complicated_function(x): msg = "Complicated_function(x) called with x={}".format(x) raise NotImplementedError(msg) try: print("step 1") f = open("thisfiledoesnotexist.txt", "tr") print("step 2") except OSError as e: print("Couldn't find the file. ") except ValueError: print("ValueError") print("Still going ....") # complicated_function(10)