結果 : how to capture error in python