{"record":{"id":"dcf50ca7a5574b89","repo":"lucasg/Dependencies","slug":"stacktrace-0-s","errorCode":null,"errorMessage":"Stacktrace:\n{0:s}\n","messagePattern":"Stacktrace:\n(.+?)\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"Dependencies/Program.cs","lineNumber":552,"sourceCode":"        {\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\n        // Json exportable\n\t\tpublic string ModuleName;\n        public string Filepath;\n        public ModuleSearchStrategy SearchStrategy;\n        public List<PeDependencyItem> Dependencies\n        {","sourceCodeStart":534,"sourceCodeEnd":570,"githubUrl":"https://github.com/lucasg/Dependencies/blob/1997a40000b77bd3326cbc33672a7b9f78bb23f3/Dependencies/Program.cs#L534-L570","documentation":"Printed by SafeExecutor<T>'s catch(Exception ex) immediately after the generic failure banner (Program.cs:552). It dumps ex.StackTrace to stderr so the developer can locate which method inside LoadPe()/ResolveDependencies() threw. It is purely diagnostic; the exception is then wrapped in RethrownException and re-thrown.","triggerScenarios":"Same as error 3: any non-RethrownException escaping the SafeExecutor action during dependency resolution.","commonSituations":"Same as error 3 - the stack trace is the primary tool for finding the real failing call (BinaryCache.LoadPe, PE.GetImports, Mono.Cecil parsing, etc.).","solutions":["Use the top frame of this stack trace to identify the failing method, then fix or guard that call.","If the trace points at phlib native code, ensure the correct VC++ Redistributable is installed (see README) and the matching x86/x64 build is used.","Pair with the Modules backtrace (error 5) lines that follow to see the full chain of containing modules."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { Program.DumpDependencyChain(pe, Program.PrettyPrinter, depth); }\ncatch (RethrownException rex)\n{\n    // The original StackTrace was already dumped to stderr by SafeExecutor;\n    // rex.InnerException preserves it programmatically for logging.\n    Logger.Error(rex.InnerException, \"dependency resolution failed\");\n}","preventionTips":["Capture stderr when running Dependencies programmatically - the stack trace is only printed, not thrown, so log redirection is required to retain it.","Keep symbols/PDBs near the binary so the printed stack trace has method names."],"tags":["stacktrace","debugging","stderr","cli"],"backgroundTag":null,"analyzedSha":"1997a40000b77bd3326cbc33672a7b9f78bb23f3","analyzedAt":"2026-08-13T18:14:41.696Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}