diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/util.lua b/lib/util.lua index 15221dd..a1de817 100644 --- a/lib/util.lua +++ b/lib/util.lua @@ -63,10 +63,20 @@ local string_rm_vid_ext = function (str) return str end +local error = function (str) + str = 'error: ' .. str + if mp then + mp.msg.warn(str) + else + print(str) + end +end + return { table_merge = table_merge, table_print = table_print, table_match_or_any = table_match_or_any, zip_ext_first = zip_ext_first, string_rm_vid_ext = string_rm_vid_ext, + error = error, } |