fix: improve error handling and logging in data generation pipeline

This commit is contained in:
Aaron Po
2026-04-07 13:36:59 -04:00
parent b8e96a6d45
commit 54c403526b
4 changed files with 183 additions and 116 deletions

View File

@@ -126,6 +126,15 @@ int main(int argc, char* argv[]) {
return generator.Run();
} catch (const std::exception& e) {
const std::string message = e.what() ? e.what() : "";
if (message.find("LlamaGenerator: malformed brewery response") !=
std::string::npos) {
spdlog::warn("WARNING: Non-fatal LLM failure after retries: {}",
message);
return 0;
}
spdlog::error("ERROR: Application failed: {}", e.what());
return 1;
}