From: Andre Noll Date: Sat, 14 Mar 2020 09:33:40 +0000 (+0100) Subject: afs: Improve error diagnostics. X-Git-Tag: v0.6.3~12 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=11eac668691942254a703300aecf2557a2ef4826 afs: Improve error diagnostics. If an afs table can not be opened, we miss to log the error reason. Also, if the audio file table does not exist, state this fact explicitly. --- diff --git a/afs.c b/afs.c index 04eed550..c4de2e8f 100644 --- a/afs.c +++ b/afs.c @@ -1043,7 +1043,8 @@ static int com_init_callback(struct afs_callback_arg *aca) } ret = open_afs_tables(); if (ret < 0) - para_printf(&aca->pbout, "cannot open afs tables\n"); + para_printf(&aca->pbout, "cannot open afs tables: %s\n", + para_strerror(-ret)); out: return ret; } diff --git a/aft.c b/aft.c index b4adbacf..f41bfade 100644 --- a/aft.c +++ b/aft.c @@ -2534,10 +2534,12 @@ static int aft_open(const char *dir) PARA_NOTICE_LOG("current audio file hash lookup: success\n"); return 1; } - PARA_NOTICE_LOG("failed to open audio file table\n"); audio_file_table = NULL; - if (ret == -OSL_ERRNO_TO_PARA_ERROR(E_OSL_NOENT)) + if (ret == -OSL_ERRNO_TO_PARA_ERROR(E_OSL_NOENT)) { + PARA_WARNING_LOG("no audio file table\n"); return 1; + } + PARA_NOTICE_LOG("failed to open audio file table\n"); return ret; }