Basically what I want is the text of the error returned from the database, something like how it's handled in LuaSQL http://keplerproject.github.io/luasql/manual.html#errors pcall is for lua errors in this case there is no lua error.

On Tue, Nov 15, 2016 at 2:10 AM, Artur Mega <findmeinwland@gmail.com> wrote:
Do you need to get text of an error? And to catch it in lua code? Why not just to check returned value? I dont remember, but returned value can be nul or item with type `userdata`. If you still want text of an error, i think you can try to catch it with pcall https://www.lua.org/pil/8.4.html

2016-11-14 23:11 GMT+05:00 Abaci B <abaci64@gmail.com>:
when runned a query using freeswitch.Dbh dbh:query, if there is results it a function for each returned row where you can see the data. however, if there is an error you can see the database returned error in the console on level ERR but you don't get it back in lua
is someone aware of a way to get the rror back into lua?

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



--
Артур

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org