From 65390e78d5d01d66feebfb9a38f21464e09c80ac Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Sun, 1 Oct 2023 07:51:23 +0530 Subject: util: init error logging --- server/subscene.lua | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'server') diff --git a/server/subscene.lua b/server/subscene.lua index 70ec3c8..ccd4d9a 100644 --- a/server/subscene.lua +++ b/server/subscene.lua @@ -183,22 +183,30 @@ local search = function (key, out) key = util.string_rm_vid_ext(key) title, rc = title_search(key) if not rc then - return nil + util.error('err: subscene: title_search') + return false end id = id_fetch(title) id = util.table_match_or_any(id, key) if not id then - return nil + util.error('subscene: table_match_or_any') + return false end link, rc = link_fetch(id) if not rc then - return nil + util.error('subscene: link_fetch') + return false end rc = sub_fetch(link, out) - return rc + if not rc then + util.error('subscene: sub_fetch') + return false + end + + return true end return { -- cgit v1.2.3