[+] 文案修改,添加提示,添加更详细的行为追踪

This commit is contained in:
huiyadanli
2019-10-22 00:19:33 +08:00
parent aa27f8a7b9
commit 33dbb63659
7 changed files with 203 additions and 16 deletions

View File

@@ -124,17 +124,17 @@ namespace RevokeMsgPatcher.Modifier
// 补丁后SHA1匹配上肯定已经打过补丁
if (matchingSHA1After != null)
{
throw new Exception($"你已经安装过此补丁,文件路径:{editor.FilePath}");
throw new BusinessException("installed", $"你已经安装过此补丁,文件路径:{editor.FilePath}");
}
// 全部不匹配,说明不支持
if (matchingSHA1Before == null && matchingSHA1After == null && matchingVersion == null)
{
throw new Exception($"不支持此版本:{editor.FileVersion},文件路径:{editor.FilePath}");
throw new BusinessException("not_support", $"不支持此版本:{editor.FileVersion},文件路径:{editor.FilePath}");
}
// SHA1不匹配版本匹配可能dll已经被其他补丁程序修改过
if ((matchingSHA1Before == null && matchingSHA1After == null) && matchingVersion != null)
{
throw new Exception($"程序支持此版本:{editor.FileVersion}。但是文件校验不通过,请确认是否使用过其他补丁程序。文件路径:{editor.FilePath}");
throw new BusinessException("maybe_modified", $"程序支持此版本:{editor.FileVersion}。但是文件校验不通过,请确认是否使用过其他补丁程序。文件路径:{editor.FilePath}");
}
}
}