File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -357,8 +357,7 @@ static handle_model_result common_params_handle_model(struct common_params_model
357357 auto download_result = common_download_model (model, opts, true );
358358
359359 if (download_result.model_path .empty ()) {
360- LOG_ERR (" error: failed to download model from Hugging Face\n " );
361- exit (1 );
360+ throw std::runtime_error (" failed to download model from Hugging Face" );
362361 }
363362
364363 model.name = model.hf_repo ;
@@ -380,8 +379,7 @@ static handle_model_result common_params_handle_model(struct common_params_model
380379 opts.offline = offline;
381380 auto download_result = common_download_model (model, opts);
382381 if (download_result.model_path .empty ()) {
383- LOG_ERR (" error: failed to download model from %s\n " , model.url .c_str ());
384- exit (1 );
382+ throw std::runtime_error (" failed to download model from " + model.url );
385383 }
386384 }
387385
You can’t perform that action at this time.
0 commit comments