Open Habbie opened 6 years ago
One painful area is the conversion between Lua and C++ types. Errors with long mangled C++ type names are not uncommon, and simply demangling them does not improve the situation much, as various type aspects (traits, allocators) then suddenly show up. @nlyan has provided some hints in https://wandbox.org/permlink/BqW1yirRM2en9PNY (mirrored at https://gist.github.com/Habbie/19a1f673d8b4ea66c8df126639b29449)
We should revisit
dnsdist-console.cc: if(!strcmp(e.what(),"invalid key to 'next'"))
as well.
~Specific case: #6535~
Specific case: #6039
This should have line numbers:
$ cat dnsdist.conf
setLocal('127.0.0.1:53', {doTCP=true})
nmg = newNMG()
nmg:addMask('foo')
$ ./dnsdist -C ./dnsdist.conf
Fatal Lua error: Exception thrown by a callback function called by Lua
Fatal pdns error: Unable to convert 'foo' to a netmask
The quality of Lua error reporting between auth, rec, dnsdist, and inside them the various features that use Lua, varies wildly. Some just say 'error in Lua' while others manage to report file names and line numbers.
This ticket is for tracking the places where we should do better.