try: a = 8/0 except Exception as e: print(e.args) print(type(e))