MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / artifact_export_fail

Function artifact_export_fail

src/pipeline/artifact.c:75–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75static int artifact_export_fail(const char *stage, const char *path, const char *err, int err_no) {
76 const char *safe_stage = stage ? stage : "unknown";
77 const char *safe_err = err ? err : "unknown";
78
79 if (path && err_no != 0) {
80 snprintf(g_export_error, sizeof(g_export_error), "%s: %s errno=%d path=%s", safe_stage,
81 safe_err, err_no, path);
82 } else if (path) {
83 snprintf(g_export_error, sizeof(g_export_error), "%s: %s path=%s", safe_stage, safe_err,
84 path);
85 } else if (err_no != 0) {
86 snprintf(g_export_error, sizeof(g_export_error), "%s: %s errno=%d", safe_stage, safe_err,
87 err_no);
88 } else {
89 snprintf(g_export_error, sizeof(g_export_error), "%s: %s", safe_stage, safe_err);
90 }
91
92 if (path && err_no != 0) {
93 cbm_log_error("artifact.export", "stage", safe_stage, "err", safe_err, "errno",
94 itoa_buf(err_no), "path", path);
95 } else if (path) {
96 cbm_log_error("artifact.export", "stage", safe_stage, "err", safe_err, "path", path);
97 } else if (err_no != 0) {
98 cbm_log_error("artifact.export", "stage", safe_stage, "err", safe_err, "errno",
99 itoa_buf(err_no));
100 } else {
101 cbm_log_error("artifact.export", "stage", safe_stage, "err", safe_err);
102 }
103 return CBM_NOT_FOUND;
104}
105
106typedef struct {
107 const char *err;

Callers 3

write_metadataFunction · 0.85
prepare_stripped_dbFunction · 0.85
cbm_artifact_exportFunction · 0.85

Calls 1

itoa_bufFunction · 0.70

Tested by

no test coverage detected