結果 : how to capture an error in python