Add additional error information when model files fail to load.

This commit is contained in:
Clint Herron 2024-07-18 13:11:16 -04:00
parent 705b7ecf60
commit 0c5f49d507

View file

@ -20830,6 +20830,7 @@ struct gguf_context * gguf_init_empty(void) {
struct gguf_context * gguf_init_from_file(const char * fname, struct gguf_init_params params) {
FILE * file = ggml_fopen(fname, "rb");
if (!file) {
fprintf(stderr, "%s: failed to open file '%s' with error '%s'\n", __func__, fname, strerror(errno));
return NULL;
}