@Rob, you are right. Setting debug to nil stops all error output to the phone console (Simulator still prints a single line, but that’s not important). It seems to be like this on a device:
debug = (intact)
* Prints to console
* Calls unhandledError
debug = nil:
* Does not print to console
* Does not call unhandledError
What I want is 1) NO to console printing, and 2) YES to calling of unhandledError. The reason being that I don’t want debug information with full source file path descriptions to be appear in phones all over the planet. I want to capture them in unhandledError and send them to my server for analysis. Is this possible?
If not, could you at the very least, for privacy reasons, not print the full path of the source file, but print the relative path from the project root (where main.lua resides), so if a crash happens with a project tree like this:
/users/john/projects/myapp/corona/main.lua
/users/john/projects/myapp/corona/game/crash.lua
… then print the following:
<Warning>: Runtime error in ./game/crash.lua:123: attempt to compare nil with number