错误处理的思考

def catchLogByHour(..., errorHandler):

    while ....:

        if hasError:

            errorHandler(...)

            



def error1(...):

    ....



catchLogByHour(...,error1)





def error2(...):

    ....



catchLogByHour(...,error2)



def error#(...):

    ....



catchLogByHour(...,error2)

 

你可能感兴趣的:(思考)