auto download_result = common_download_model(model, opts, true);
if (download_result.model_path.empty()) {
- LOG_ERR("error: failed to download model from Hugging Face\n");
- exit(1);
+ throw std::runtime_error("failed to download model from Hugging Face");
}
model.name = model.hf_repo;
opts.offline = offline;
auto download_result = common_download_model(model, opts);
if (download_result.model_path.empty()) {
- LOG_ERR("error: failed to download model from %s\n", model.url.c_str());
- exit(1);
+ throw std::runtime_error("failed to download model from " + model.url);
}
}