lua try catch code example
Example: try except lua
require "try-catch"
try {
function()
error('oops')
end,
catch {
function(error)
print('caught error: ' .. error)
end
}
}
require "try-catch"
try {
function()
error('oops')
end,
catch {
function(error)
print('caught error: ' .. error)
end
}
}