結果 : how to raise an error in python function