{"record":{"id":"834e8eb092d61005","repo":"babalae/better-genshin-impact","slug":"error-834e8e","errorCode":null,"errorMessage":"地脉花类型无效，请重新选择","messagePattern":"地脉花类型无效，请重新选择","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropTask.cs","lineNumber":186,"sourceCode":"        _systemInfo = TaskContext.Instance().SystemInfo;\n        _tpTask = new TpTask(_ct);\n        ValidateSettings();\n        LoadConfigData();\n        LoadRecognitionObjects();\n    }\n\n    private void ValidateSettings()\n    {\n        _taskParam.FightConfig ??= new AutoLeyLineOutcropFightConfig();\n\n        if (string.IsNullOrWhiteSpace(_taskParam.LeyLineOutcropType))\n        {\n            throw new Exception(\"地脉花类型未选择\");\n        }\n\n        if (_taskParam.LeyLineOutcropType != \"启示之花\" && _taskParam.LeyLineOutcropType != \"藏金之花\")\n        {\n            throw new Exception(\"地脉花类型无效，请重新选择\");\n        }\n\n        if (string.IsNullOrWhiteSpace(_taskParam.Country))\n        {\n            throw new Exception(\"国家未配置\");\n        }\n\n        if (!string.IsNullOrWhiteSpace(_taskParam.FriendshipTeam) && string.IsNullOrWhiteSpace(_taskParam.Team))\n        {\n            throw new Exception(\"配置好感队时必须配置战斗队伍\");\n        }\n\n        if (_taskParam.Count < 1)\n        {\n            _taskParam.Count = 1;\n        }\n\n        if (string.IsNullOrWhiteSpace(_taskParam.FightConfig.StrategyName) && _taskParam.Timeout > 0)","sourceCodeStart":168,"sourceCodeEnd":204,"githubUrl":"https://github.com/babalae/better-genshin-impact/blob/a7cb36712dcb409be610257d877fcea3597e9d6b/BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropTask.cs#L168-L204","documentation":"Thrown by ValidateSettings when LeyLineOutcropType is set to a value that is neither '启示之花' (blossoms of revelation) nor '藏金之花' (blossoms of wealth). These are the only two ley line blossom types in Genshin Impact and the only two the automation supports. Any other string value — including localized variants, English equivalents, or typos — is rejected.","triggerScenarios":"LeyLineOutcropType was assigned a non-whitespace string that does not exactly match one of the two supported Chinese names. Common causes: a trailing space, full-width vs half-width characters, an English value like 'Revelation', or an outdated value from an older config schema.","commonSituations":"Configuration file edited by hand with a wrong value; a UI dropdown was changed to a custom/free-text entry; the value was copied from a localization other than Simplified Chinese; a version update changed the expected values.","solutions":["Set LeyLineOutcropType to exactly '启示之花' or '藏金之花' (Simplified Chinese, no trailing spaces).","If using the UI, re-select the type from the dropdown rather than typing it manually.","Check the configuration file for full-width characters or invisible whitespace."],"exampleFix":"// before\ntaskParam.LeyLineOutcropType = \"启示之花 \"; // trailing space\n\n// after\ntaskParam.LeyLineOutcropType = \"启示之花\";","handlingStrategy":"validation","validationCode":"// Before starting, validate the ley line type value\nvar validTypes = new[] { \"启示之花\", \"藏金之花\" };\nif (!validTypes.Contains(taskParam.LeyLineOutcropType))\n{\n    Logger.LogError(\"地脉花类型无效，请选择 启示之花 或 藏金之花\");\n    return;\n}","typeGuard":"public static bool IsValidLeyLineType(string type)\n{\n    return type == \"启示之花\" || type == \"藏金之花\";\n}","tryCatchPattern":null,"preventionTips":["Use the UI dropdown rather than free text to set the ley line type.","Check for trailing spaces or full-width characters in the value.","Only use the exact Simplified Chinese names '启示之花' and '藏金之花'."],"tags":["ley-line","validation","configuration","param"],"backgroundTag":null,"analyzedSha":"a7cb36712dcb409be610257d877fcea3597e9d6b","analyzedAt":"2026-08-13T16:44:57.548Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}