From 5d23df5494410e26783d202450225949d8aa3985 Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Wed, 10 Jul 2024 19:17:22 +0200 Subject: [PATCH] Improved docstring --- errors.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/errors.lua b/errors.lua index 639c834..48e868b 100644 --- a/errors.lua +++ b/errors.lua @@ -1,14 +1,15 @@ - --- Check for possible loading errors +--- # Errors +-- +-- Lua library for advanced error handling. local string_dist do - local thispath = ... and (...):match('.+%.') or '' + local this_path = ... and (...):match('.+%.') or '' local function import (name, ignore_failure) - local was_loaded, lib_or_error = pcall(require, thispath..name) + local was_loaded, lib_or_error = pcall(require, this_path..name) if not was_loaded then if ignore_failure then return nil end - error('['..thispath..']: Could not load vital library: '..name..'.lua:\n\t'..lib_or_error) + error('['..this_path..']: Could not load vital library: '..name..'.lua:\n\t'..lib_or_error) end return lib_or_error end