Skip to content

Commit

Permalink
Updated error message
Browse files Browse the repository at this point in the history
  • Loading branch information
jesper-friis committed Dec 4, 2024
1 parent 4aad179 commit 1943481
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions src/dlite-storage-plugins.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,25 @@ const DLiteStoragePlugin *dlite_storage_plugin_get(const char *name)
}
}

if (n <= 1)
if (n <= 1) {
m += asnpprintf(&buf, &size, m,
" Are the required Python packages installed or %s\n"
" DLITE_STORAGE_PLUGIN_DIRS or "
"DLITE_PYTHON_STORAGE_PLUGIN_DIRS\n"
" environment variables set?", submsg);
" If the plugin is listed above, but could not be "
"loaded, it may be an\n"
" error in the plugin. Are the required Python "
"packages installed?\n");
}
if (!getenv("DLITE_PYDEBUG")) {
r = asnpprintf(&buf, &size, m,
" Please rerun with the DLITE_PYDEBUG environment "
"variable set.\n");
if (r >= 0) m += r;
}
r = asnpprintf(&buf, &size, m,
" If the plugin is not listed above, it may not be "
"in the search path.\n"
" Are the %sDLITE_STORAGE_PLUGIN_DIRS or "
"DLITE_PYTHON_STORAGE_PLUGIN_DIRS\n"
" environment variables set?", submsg);
errx(dliteStorageOpenError, "%s", buf);
#endif
free(buf);
Expand Down

0 comments on commit 1943481

Please sign in to comment.