{"record":{"id":"789f002b14c86847","repo":"lucasg/Dependencies","slug":"0-s","errorCode":null,"errorMessage":" - \"{0:s}\"","messagePattern":" - \"\\{0:s\\}\"","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"Dependencies/Program.cs","lineNumber":546,"sourceCode":"\n            string Tabs = string.Concat(Enumerable.Repeat(\"|  \", localRecursionLevel));\n\t\t\tConsole.WriteLine(\"{0:s}├ {1:s} ({2:s}) : {3:s} \", Tabs, ModuleName, SearchStrategy.ToString(), Filepath);\n\t\t}\n\n        private void SafeExecutor(Action action)\n        {\n            SafeExecutor(() => { action(); return 0; });\n        }\n\n        private T SafeExecutor<T>(Func<T> action)\n        {\n            try\n            {\n                return action();\n            }\n            catch (RethrownException rex)\n            {\n                Console.Error.WriteLine(\" - \\\"{0:s}\\\"\", Filepath);\n                throw rex;\n            }\n            catch (Exception ex)\n            {\n                Console.Error.WriteLine(\"[!] Unhandled exception occured while processing \\\"{1:s}\\\"\", RecursionLevel, Filepath);\n                Console.Error.WriteLine(\"Stacktrace:\\n{0:s}\\n\", ex.StackTrace);\n                Console.Error.WriteLine(\"Modules backtrace:\");\n                throw new RethrownException(ex);\n            }\n            finally\n            {\n                //\n                \n            }\n\n            // return default(T);\n        }\n","sourceCodeStart":528,"sourceCodeEnd":564,"githubUrl":"https://github.com/lucasg/Dependencies/blob/1997a40000b77bd3326cbc33672a7b9f78bb23f3/Dependencies/Program.cs#L528-L564","documentation":"Printed by PeDependencyItem.SafeExecutor<T> (Program.cs:546) inside its catch(RethrownException rex) branch. A RethrownException is only ever thrown by the sibling catch(Exception) below (Program.cs:554), so seeing this line means a dependency node deeper in the recursion already failed, was wrapped once, and is now bubbling up through this item's SafeExecutor. The line prints the current item's Filepath to build a human-readable module backtrace, then re-throws the same RethrownException so it keeps unwinding.","triggerScenarios":"During DumpDependencyChain -> PeDependencies ctor -> Root.ResolveDependencies() (Program.cs:428-492) recursion: a child PeDependencyItem.LoadPe()/ResolveDependencies() throws, its SafeExecutor wraps it as RethrownException, and each ancestor SafeExecutor prints this line as it propagates.","commonSituations":"A transitively-required DLL cannot be loaded/parsed (locked, deleted mid-run, corrupted), so the whole chain resolution aborts and the backtrace of containing modules is printed to stderr.","solutions":["Read the chain of these lines from the LAST printed up to identify the deepest module that started the failure, then resolve that module's load problem (unlock/restore the file).","Lower the recursion depth with `-depth N` to isolate which branch of the dependency tree triggers the failing module.","Enable the binary cache (`-cache`) so transient file-locking failures during recursive loading are avoided."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// RethrownException is the single failure type escaping SafeExecutor.\n// Catch it ONCE at the top-level entry point; do not swallow it lower down.\ntry\n{\n    Program.DumpDependencyChain(pe, Program.PrettyPrinter, depth);\n}\ncatch (RethrownException rex)\n{\n    // rex.InnerException chain holds the original cause; module backtrace already\n    // printed to stderr by each SafeExecutor frame.\n    Console.Error.WriteLine($\"Dependency resolution aborted: {rex.Message}\");\n}","preventionTips":["Only the top-level caller should catch RethrownException; intermediate frames must let it propagate so the module backtrace stays intact.","Pre-validate the root PE with PE.Load() before constructing PeDependencies to avoid the most common deep failure."],"tags":["dependency-resolution","recursive","rethrow","stderr","cli"],"backgroundTag":null,"analyzedSha":"1997a40000b77bd3326cbc33672a7b9f78bb23f3","analyzedAt":"2026-08-13T18:14:41.696Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}