Hi all,
I’ve implemented the runtime error handler a while ago following the examples provided in the documentation:
function errorHandler( event ) print("Error Handler Entered...) print( "errorHandler:", event.errorMessage, event.stackTrace ) Runtime:dispatchEvent({name='coronaView', message = 'gameError', errorMessage=event.errorMessage, stackTrace=event.stackTrace}) return true end Runtime:addEventListener( "unhandledError", errorHandler )
This code works perfectly in the simulator, print lines and all. But when running in the device, this event appears to never be called. The error line appears as per normal even without a handler, but the print line doesn’t appear in the printout and the error is not handled as intended. I found another forum post from 2013 with the same problem but no solution has been posted.
The game is running through CoronaCards, and the problem exists on both Android and iOS.
Anyone have any advice about possible reasons for this? Are there any special permissions required in the build.settings file?
Thanks for any help you can offer,
Thomas