python catch exception and print exception neatly code example Example: throwing an exception python raise Exception("message")