huiyadanli/RevokeMsgPatcher · error · BusinessException
not_support
not_support
Error message
不支持的文件:名称 {editor.FileName} 版本 {editor.FileVersion}! What it means
The file's SHA1 matched neither SHA1Before nor SHA1After, its version matched no ModifyInfo, and no CommonModifyInfo (feature/signature) applies for the file's version range. AppModifier throws BusinessException('not_support') with the file name and version.
Source
Thrown at RevokeMsgPatcher/Modifier/AppModifier.cs:369
if (editor.FileCommonModifyInfo != null && editor.FileCommonModifyInfo.ReplacePatterns != null)
{
List<ReplacePattern> replacePatterns = editor.FileCommonModifyInfo.ReplacePatterns;
// 根据需要操作的功能类型(防撤回或者多开等)筛选特征码
if (categories != null && categories.Count > 0)
{
replacePatterns = editor.FileCommonModifyInfo.ReplacePatterns.Where(info => categories.Contains(info.Category)).ToList();
}
// 如果能顺利得到 TargetChanges 不报错则可以使用特征替换方式
editor.TargetChanges = ModifyFinder.FindChanges(editor.FilePath, replacePatterns);
continue;
}
else
{
// SHA1不匹配,连版本也不匹配,说明完全不支持
if (matchingVersion == null)
{
throw new BusinessException("not_support", $"不支持的文件:名称 {editor.FileName} 版本 {editor.FileVersion}!");
}
// SHA1不匹配,但是版本匹配,可能dll已经被其他补丁程序修改过
if (matchingVersion != null)
{
throw new BusinessException("maybe_modified", $"程序支持此文件版本: {editor.FileName} - {editor.FileVersion}。但是文件校验不通过,请确认是否使用过其他补丁程序!");
}
}
}
}
}
/// <summary>
/// c.根据补丁信息,安装补丁
/// 两种打补丁的方式:精准(指定位置替换)、通用(特征码替换)
/// </summary>
/// <returns></returns>
public bool Patch()View on GitHub (pinned to 89cbbb3f0c)
Solutions
- Update RevokeMsgPatcher to the latest release for newer patch data.
- Check the supported version list; downgrade the target app to a supported version if needed.
- Confirm the correct install path and that the expected DLL is being targeted.
Defensive patterns
Strategy: try-catch
Type guard
static bool IsBusinessException(Exception e, string code) => e is BusinessException b && b.ErrorCode == code; static bool IsNotSupported(Exception e) => IsBusinessException(e, "not_support");
Try / catch
try
{
modifier.ValidateAndFindModifyInfo(categories);
}
catch (BusinessException ex) when (ex.ErrorCode == "not_support")
{
MessageBox.Show($"不支持的文件版本,请更新本程序或使用受支持的版本。\n{ex.Message}");
} Prevention
- Update RevokeMsgPatcher to the latest release for new version coverage.
- Check supported versions before patching; downgrade the target app if needed.
- Filter by ErrorCode 'not_support' and prompt for an update rather than a silent failure.
When it happens
Trigger: The target DLL is a version for which the patcher has no data at all: neither a precise SHA1 entry nor a signature-based entry in range.
Common situations: The app updated to an unsupported version; a wrong/unexpected file was targeted; patch.json is out of date.
Related errors
AI-assisted analysis of huiyadanli/RevokeMsgPatcher@89cbbb3f0c (2026-08-13).
Data as JSON: /api/errors/415b60883bbf72cf.
Report an issue: GitHub.