huiyadanli/RevokeMsgPatcher · warning · BusinessException
match_inconformity
match_inconformity
Error message
特征比对:以下功能补丁已经安装,请取消勾选!
已安装功能:【{string.Join("、", res.Item2)}】 What it means
matchNum was below the expected count and IsAllReplaced returned a non-empty set of already-replaced category names, but not all of them. FindChanges throws BusinessException('match_inconformity') listing those categories and telling the user to uncheck them.
Source
Thrown at RevokeMsgPatcher/Matcher/ModifyFinder.cs:56
changes.Add(new Change(matchIndexs[i], pattern.Replace));
}
}
}
}
// 匹配数和期望的匹配数不一致时报错(当前一个特征会出现多次)
if (matchNum < replacePatterns.Count)
{
Tuple<bool, SortedSet<string>> res = IsAllReplaced(fileByteArray, replacePatterns);
if (res.Item1)
{
throw new BusinessException("match_already_replace", "特征比对:当前应用已经安装了对应功能的补丁!");
}
else
{
if (res.Item2.Count > 0)
{
throw new BusinessException("match_inconformity", $"特征比对:以下功能补丁已经安装,请取消勾选!\n已安装功能:【{string.Join("、", res.Item2)}】");
}
else
{
throw new BusinessException("match_inconformity", $"特征比对:当前特征码匹配数[{matchNum}]和期望的匹配数[{replacePatterns.Count}]不一致。\n" +
$"出现此种情况的一般有如下可能:\n" +
$"1. 你可能已经安装了某个功能的补丁,请选择未安装功能进行安装。\n" +
$"2. 如果当前版本为最新版本,特征码可能出现变化(可能性比较低),请联系作者处理。");
}
}
}
else
{
// 匹配数和需要替换的数量不一致时,可能时部分/所有特征已经被替换
if (matchNum != changes.Count)
{
// 此逻辑在当前特征配置下不会进入,因为查找串和替换串当前全部都是不相同的
if (changes.Count == 0)
{View on GitHub (pinned to 89cbbb3f0c)
Solutions
- Uncheck the categories named in the error message and retry.
- Alternatively, restore the DLL to start from a clean state, then re-select features.
Defensive patterns
Strategy: try-catch
Type guard
static bool IsBusinessException(Exception e, string code) => e is BusinessException b && b.ErrorCode == code; static bool IsInconformity(Exception e) => IsBusinessException(e, "match_inconformity");
Try / catch
try
{
modifier.ValidateAndFindModifyInfo(categories);
}
catch (BusinessException ex) when (ex.ErrorCode == "match_inconformity")
{
// Message lists already-installed categories; prompt to uncheck them.
MessageBox.Show(ex.Message);
} Prevention
- Parse the listed categories from the message and auto-uncheck them in the UI.
- Pre-scan installed features with ModifyFinder.FindReplacedFunction to gray them out.
- Filter by ErrorCode 'match_inconformity', not by Chinese substring.
When it happens
Trigger: A subset of the selected feature categories is already patched in the DLL (search bytes gone, replace bytes present for those categories), while at least one selected category is not.
Common situations: User selects several features where some were installed in a previous run and others were not.
Related errors
AI-assisted analysis of huiyadanli/RevokeMsgPatcher@89cbbb3f0c (2026-08-13).
Data as JSON: /api/errors/2b1569a00f1b3004.
Report an issue: GitHub.