mirror of
https://github.com/JamesonHuang/OpenWrt_Luci_Lua.git
synced 2025-06-22 19:10:38 +00:00
h12 dev demo
This commit is contained in:
15
1_3.test_code/lua_test/1_3.test_pcall.lua
Normal file
15
1_3.test_code/lua_test/1_3.test_pcall.lua
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
function testPcall()
|
||||
rint("error")
|
||||
end
|
||||
|
||||
local r, msg = pcall(function()
|
||||
testPcall()
|
||||
end)
|
||||
if r == false then
|
||||
print("error msg:"..msg)
|
||||
print("end")
|
||||
end
|
||||
|
||||
-- rint("error")
|
||||
|
Reference in New Issue
Block a user