>>>+ if url.nil? >>>+ message = 'No commit url found' >>>+ email_msg = build_err_message(email, message) >> >>调用层级混乱了. >>这个函数就只管parse url. 不管发错误邮件. > >there are for error email: >no url >no pub key >base url not in upstream-repos >unavailable commit url > >it will raise error if these error occur, and the process will be >interrupt, >so send error email before raise error, or just raise error and don't >send error emails 解析url的函数就只管解析. 为啥要跟send_mail耦合在一起. send_mail应该由高层次的函数调用.