Add additional error information when model files fail to load.
This commit is contained in:
parent
705b7ecf60
commit
0c5f49d507
1 changed files with 1 additions and 0 deletions
|
@ -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) {
|
struct gguf_context * gguf_init_from_file(const char * fname, struct gguf_init_params params) {
|
||||||
FILE * file = ggml_fopen(fname, "rb");
|
FILE * file = ggml_fopen(fname, "rb");
|
||||||
if (!file) {
|
if (!file) {
|
||||||
|
fprintf(stderr, "%s: failed to open file '%s' with error '%s'\n", __func__, fname, strerror(errno));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue