update: add custom error for unloaded pool info
This commit is contained in:
@ -77,8 +77,10 @@ size_t lm_ctx_sync(lm_ctx_t *ctx, bool do_update, lm_ctx_sync_callback_t callbac
|
||||
cbdata.pool = cur;
|
||||
cbdata.state = SYNC_DOWNLOADING_LIST;
|
||||
|
||||
if(!cur->loaded)
|
||||
if(!cur->loaded){
|
||||
lm_error_set(LM_ERR_InfoNotLoaded);
|
||||
goto next_list;
|
||||
}
|
||||
|
||||
if(lm_pool_path_is_empty(cur)){
|
||||
pdebug(__func__, "(%s) failed to load list, pool paths are empty", cur->name);
|
||||
|
@ -155,6 +155,7 @@ void lm_error_set(lm_error_t code, ...) {
|
||||
{.code = LM_ERR_HashDigestFail, .desc = _("failed create digest for hashing") },
|
||||
{.code = LM_ERR_FileHashFail, .desc = _("failed to get hash of %s: %s") },
|
||||
{.code = LM_ERR_FileHashNoMatch, .desc = _("file hash does not match for %s") },
|
||||
{.code = LM_ERR_InfoNotLoaded, .desc = _("pool info is not loaded") },
|
||||
};
|
||||
|
||||
char *fmt = NULL;
|
||||
|
Reference in New Issue
Block a user