[Freeswitch-users] lua script error handling

Mimiko vbvbrj at gmail.com
Tue Mar 28 14:23:32 MSD 2017


Hello

I want to implement handling of run-time errors in lua using pcall:

status,err = pcall(dbh:query,querystring)
if (not status or dbh:affected_rows()<1) then
print('error')
end

But I get an error for pcall: function arguments expected near ','

Examples for programming in Lua shows this syntax for pcall. However in FS it does not work.

How to handle errors with pcall?

-- 
Mimiko desu.



Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list