Hello community!
I have set up a basic error handling in my app, code looks like this (main.lua):
local function unhandledErrorListener(event) FLURRY\_ANALYTICS\_SERVICE:logIosError(event.errorMessage, event.stackTrace) --- Display native dialog to user and go to startup screen local function reloadAlertListener(event) if "clicked" == event.action then timer.performWithDelay(100, function() storyboard.gotoScene("scenes.startupScreen") end) end end native.showAlert("It's a Bug!", "Sorry, but an error has occured.\n\nWe will do our best to fix it as soon as possible with the next update!", { "Reload the App", }, reloadAlertListener) return true end Runtime:addEventListener("unhandledError", unhandledErrorListener)
The problem is, all stacktraces being reported have question marks instead of .lua file names/functions all over the place:
stack traceback: [C]: ? ?: in function '?' ?: in function '?' ?: in function '\_listener' ?: in function \<?:141\> ?: in function \<?:218\>
There is no way to find out in which .lua file it happened. How to get all function names instead of question marks?
Maybe some tips on how to get a meaningful stacktrace?
Thanks in advance