Compare commits
No commits in common. "32a924fa4eeb70f2472b05e9209161fcf5871894" and "5b0cdc5b21ab5db4f9af6f8e6d39a65c1e497469" have entirely different histories.
32a924fa4e
...
5b0cdc5b21
7
LICENSE
7
LICENSE
|
@ -1,7 +0,0 @@
|
||||||
"THE BEER-WARE LICENSE" (Revision 42):
|
|
||||||
|
|
||||||
<jonjmaa@gmail.com> wrote this program. As long as you retain this notice you
|
|
||||||
can do whatever you want with this stuff. If we meet some day, and you think
|
|
||||||
this stuff is worth it, you can buy me a beer in return.
|
|
||||||
|
|
||||||
Jon Michael Aanes
|
|
6
LICENSE.txt
Normal file
6
LICENSE.txt
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
|
||||||
|
<jonjmaa@gmail.com> wrote this library. As long as you retain this notice you
|
||||||
|
can do whatever you want with this stuff. If we meet some day, and you think
|
||||||
|
this stuff is worth it, you can buy me a beer in return.
|
||||||
|
- Jon Michael Aanes
|
||||||
|
|
20
README.md
20
README.md
|
@ -1,19 +1,3 @@
|
||||||
<!--- WARNING --->
|
# Errors
|
||||||
<!--- THIS IS AN AUTO-GENERATED FILE --->
|
|
||||||
<!--- MANUAL CHANGES CAN AND WILL BE OVERWRITTEN --->
|
|
||||||
|
|
||||||
# Lua library for advanced error handling.
|
Lua Library for advanced error handling.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# License
|
|
||||||
|
|
||||||
```
|
|
||||||
"THE BEER-WARE LICENSE" (Revision 42):
|
|
||||||
|
|
||||||
<jonjmaa@gmail.com> wrote this program. As long as you retain this notice you
|
|
||||||
can do whatever you want with this stuff. If we meet some day, and you think
|
|
||||||
this stuff is worth it, you can buy me a beer in return.
|
|
||||||
|
|
||||||
Jon Michael Aanes
|
|
||||||
```
|
|
||||||
|
|
11
errors.lua
11
errors.lua
|
@ -1,15 +1,14 @@
|
||||||
--- # Errors
|
|
||||||
--
|
-- Check for possible loading errors
|
||||||
-- Lua library for advanced error handling.
|
|
||||||
|
|
||||||
local string_dist
|
local string_dist
|
||||||
do
|
do
|
||||||
local this_path = ... and (...):match('.+%.') or ''
|
local thispath = ... and (...):match('.+%.') or ''
|
||||||
local function import (name, ignore_failure)
|
local function import (name, ignore_failure)
|
||||||
local was_loaded, lib_or_error = pcall(require, this_path..name)
|
local was_loaded, lib_or_error = pcall(require, thispath..name)
|
||||||
if not was_loaded then
|
if not was_loaded then
|
||||||
if ignore_failure then return nil end
|
if ignore_failure then return nil end
|
||||||
error('['..this_path..']: Could not load vital library: '..name..'.lua:\n\t'..lib_or_error)
|
error('['..thispath..']: Could not load vital library: '..name..'.lua:\n\t'..lib_or_error)
|
||||||
end
|
end
|
||||||
return lib_or_error
|
return lib_or_error
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user