Hello,
I have implemented a runtime error handler, as seen on various part of the doc, but they always cause a black screen.
If I catch an error and return false, I get the usual error popup, but if I return true (which should let the application continue) the app gets in black screen mode (code still running, no crash, Corona just doesn’t show anything to the screen).
Here’s my code
local errorCount = 0 local maxErrorCount = 30 local unhandledErrorListener = function (event) if event.errorMessage then print("[CORONA] Unhandled error: " .. event.errorMessage .. event.stackTrace) end errorCount = errorCount + 1 if errorCount \<= maxErrorCount then GA.newEvent("error", {message = event.errorMessage .. event.stackTrace, severity = "critical"}) end print("ERROR HANDLER WORKING") return true end Runtime:addEventListener("unhandledError", function (event) return unhandledErrorListener(event) end)
But actually my code doesn’t really matter here. Even if I just return true in the handler with no other code the same thing happens.
I have tried generating errors by calling the error function at different places (in the main, in a scene show-did event, etc.) and I have tried creating the runtime error handler at different places too.
This is on version 2015.2552
Oh and also, nothing in the console (but my prints do appear)