fix comment

This commit is contained in:
younesbelkada
2025-07-07 17:23:47 +04:00
parent 042e5ff90b
commit f74e266f04

View File

@@ -2220,8 +2220,14 @@ llama_context * llama_init_from_model(
return nullptr; return nullptr;
} }
auto * ctx = new llama_context(*model, params); try {
return ctx; auto * ctx = new llama_context(*model, params);
return ctx;
} catch (const std::exception & err) {
LLAMA_LOG_ERROR("%s: failed to initialize the context: %s\n", __func__, err.what());
}
return nullptr;
} }
// deprecated // deprecated