aboutsummaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2023-10-01 07:51:23 +0530
committersinanmohd <sinan@sinanmohd.com>2023-10-01 08:42:13 +0530
commit65390e78d5d01d66feebfb9a38f21464e09c80ac (patch)
tree24417e1588ad76fc496353a11ffdb0f1f5db022e /server
parentdbc20e0a10883b8cb44343432d4539009a45611b (diff)
util: init error logging
Diffstat (limited to 'server')
-rw-r--r--server/subscene.lua16
1 files changed, 12 insertions, 4 deletions
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 {