mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Added exceptions to error call when not a string
This commit is contained in:
@@ -11,6 +11,9 @@ Discord: https://discord.gg/r6dC2uK
|
|||||||
-- Replaces the base error function
|
-- Replaces the base error function
|
||||||
_error = error
|
_error = error
|
||||||
error = function(err)
|
error = function(err)
|
||||||
|
if type(err) == 'table' then err = serpent.line(err) -- used factorio build in to avoid more errors
|
||||||
|
elseif type(err) ~= 'number' and type(err) ~= 'string' then err = tostring(err)
|
||||||
|
end
|
||||||
verbose('Error Called: '..err)
|
verbose('Error Called: '..err)
|
||||||
if _G.error_handle and type(error_handle) == 'function' then
|
if _G.error_handle and type(error_handle) == 'function' then
|
||||||
verbose('Exception Caught By Error Handle')
|
verbose('Exception Caught By Error Handle')
|
||||||
|
|||||||
Reference in New Issue
Block a user