错误处理的思考
def catchLogByHour(..., errorHandler): while ....: if hasError: errorHandler(...) def error1(...): .... catchLogByHour(...,error1) def error2(...): .... catchLogByHour(...,error2) def error#(...): .... catchLogByHour(...,error2)
增加语言的了解程度可以避免写出愚蠢的代码