try: 1+2 except Exception as e: # $ exceptionInfo e def test_exception(): try: 1+2 except Exception as e: # $ exceptionInfo e