{"record":{"id":"04e06c8e016b0795","repo":"babalae/better-genshin-impact","slug":"error-04e06c","errorCode":null,"errorMessage":"没有可用路径","messagePattern":"没有可用路径","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropTask.cs","lineNumber":669,"sourceCode":"                }\n\n                reversePaths.Add(new PathInfo\n                {\n                    StartNode = teleportNode,\n                    TargetNode = targetNode,\n                    Routes = [route.Route, nextRoute.Route]\n                });\n            }\n        }\n\n        return reversePaths;\n    }\n\n    private static PathInfo SelectOptimalPath(List<PathInfo> paths)\n    {\n        if (paths.Count == 0)\n        {\n            throw new Exception(\"没有可用路径\");\n        }\n\n        return paths.OrderBy(p => p.Routes.Count).First();\n    }\n\n    private async Task ExecutePath(PathInfo path)\n    {\n        foreach (var routePath in path.Routes)\n        {\n            await RunPathingFile(routePath);\n        }\n\n        var lastRoute = path.Routes.Last();\n        var targetRoute = BuildTargetRoute(lastRoute);\n        var rerunRoute = BuildRerunRoute(lastRoute);\n        var fromTeleportStart = \"teleport\".Equals(path.StartNode.Type, StringComparison.OrdinalIgnoreCase);\n        await ProcessLeyLineOutcrop(_taskParam.FightConfig.Timeout, targetRoute, rerunRoute, fromTeleportStart);\n","sourceCodeStart":651,"sourceCodeEnd":687,"githubUrl":"https://github.com/babalae/better-genshin-impact/blob/a7cb36712dcb409be610257d877fcea3597e9d6b/BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropTask.cs#L651-L687","documentation":"Thrown by SelectOptimalPath when the paths list passed to it is empty. SelectOptimalPath is a static method that picks the path with the fewest route segments from a list of candidate paths produced by FindPathsToTarget (BFS over the node graph) plus FindReversePathsIfNeeded. An empty list means there is no route in the node graph from any teleport node to the target ley line blossom node — neither a forward path nor a reverse/teleport-hop fallback.","triggerScenarios":"Called from ExecutePathsUsingNodeData after FindPathsToTarget and FindReversePathsIfNeeded both returned empty. This means the LeyLineOutcropData.json node graph has no edges connecting any teleport to the target blossom, or the target node's Next/Prev lists are empty.","commonSituations":"LeyLineOutcropData.json is missing edges for a specific ley line position; the node graph data is outdated and does not cover a newly discovered blossom location; the target node was found by position but has no graph connectivity; the route JSON files referenced by edges are missing or misnamed.","solutions":["Update LeyLineOutcropData.json with the correct edges connecting a teleport node to the target blossom node.","Verify the route JSON files referenced in the edges exist under assets/pathing/.","If the ley line position is new, add the corresponding node and edges to the data file.","Fall back to the handbook-based navigation mode if the node graph is incomplete for this region."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before calling SelectOptimalPath, verify paths are non-empty\nvar paths = FindPathsToTarget(nodeData, targetNode);\nif (paths.Count == 0)\n{\n    Logger.LogWarning(\"未找到从传送点到地脉花的路径，跳过此位置\");\n    await EnsureExitRewardPage();\n    return; // skip this position instead of throwing\n}","typeGuard":null,"tryCatchPattern":"catch (Exception ex) when (ex.Message.Contains(\"没有可用路径\"))\n{\n    logger.LogWarning(ex, \"节点图中无可用路径，尝试下一条地脉花\");\n    await EnsureExitRewardPage();\n    continue; // try the next ley line position\n}","preventionTips":["Keep LeyLineOutcropData.json up to date with edges connecting teleports to all blossom nodes.","Before calling SelectOptimalPath, check if paths is empty and handle gracefully.","Validate node graph connectivity for each region after loading node data."],"tags":["ley-line","pathing","node-graph","navigation","data-missing"],"backgroundTag":null,"analyzedSha":"a7cb36712dcb409be610257d877fcea3597e9d6b","analyzedAt":"2026-08-13T16:44:57.548Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}