Compare commits
3 Commits
5b0cdc5b21
...
32a924fa4e
Author | SHA1 | Date | |
---|---|---|---|
32a924fa4e | |||
c1eb786af8 | |||
5d23df5494 |
7
LICENSE
Normal file
7
LICENSE
Normal file
|
@ -0,0 +1,7 @@
|
|||
"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
|
|
@ -1,6 +0,0 @@
|
|||
|
||||
<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,3 +1,19 @@
|
|||
# Errors
|
||||
<!--- WARNING --->
|
||||
<!--- 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,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
|
||||
|
|
Loading…
Reference in New Issue
Block a user