結果 : how to capture errors in python