What features should we add to Corona?

A server to receive all errors

Purpose a plugin who send automatically all errors from all device to a server. The server classify the data and show it to the developer.
- All developers need this plugin
- The reputation of corona will increase because corona app will have less bug

If someone is interest to develop it and need more informations, I can provide them because I use it every day to improve my app !

In the app:
local function networkListener( event )
if ( event.isError ) then
print( "Network Error." )
else
if ( event.phase == "began" ) then
elseif ( event.phase == "progress" ) then
elseif ( event.phase == "ended" ) then
local loadsave = require("loadsave")
loadsave.saveTable(nil, "undeuxtroissoleilbug.json" )
end
end
end
local headers = {}
headers["Content-Type"] = "application/x-www-form-urlencoded"
headers["Accept-Language"] = "en-US"
local contents = ""
if true then
local json=require("json")
local path=system.pathForFile("undeuxtroissoleilbug.json",system.DocumentsDirectory)
local file=io.open( path, "r" )
if file then
contents=file:read( "*a" )
io.close( file )
end
end
if string.len(contents)>10 then
local body="json="..contents
--envoieerror=true
local params = {}
params.headers = headers
params.body = body
network.request("https://stats.arthafrance.com/errors.php", "POST", networkListener, params )
end

local saveerror=true -- evite d'enregistré 100 fois la meme erreurs
local function myUnhandledErrorListener( event )
if saveerror then --false then -- true then corriger ce bug reinit la sauvegarde
local chainesave=event.errorMessage.."stack"..event.stackTrace
chainesave=chainesave:gsub("%c","")
chainesave=chainesave:gsub("%p","")
chainesave=chainesave:gsub("%s","")
local loadsave = require("loadsave")
local bug=loadsave.loadTable("undeuxtroissoleilbug.json")
if bug==nil then
bug={}
end
chainesave=system.getInfo("deviceID").."FINID"..system.getInfo("appVersionString").."FINVERSION"..chainesave
bug[#bug+1]=chainesave
loadsave.saveTable(bug, "undeuxtroissoleilbug.json" )
saveerror=false
local function timersaveerror(event)
saveerror=true
end
timer.performWithDelay(50,timersaveerror)
end
if releaseBuild then
print( "Handling the unhandled error >>>\n", event.errorMessage )
if isandroid and analyticsactif then
analytics.logEvent("error",event.errorMessage)
end
local chainecomplete="Envoyez le screenshot à Artha.France@gmail.com"
for i=1,string.len(event.errorMessage),40 do
chainecomplete=chainecomplete.."\n"..string.sub(event.errorMessage,i,i+40)
end
display.newText(chainecomplete,contentcenterx,contentcentery, native.systemFont, 18 )
else
if isandroid and analyticsactif then
analytics.logEvent("error",event.errorMessage)
end

--saveret.bug=saveret.bug.." "..
print( "Not handling the unhandled error >>>\n", event.errorMessage )
end

return true
end

Runtime:addEventListener("unhandledError", myUnhandledErrorListener)

5 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Maggle shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    2 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • redninjacat commented  ·   ·  Flag as inappropriate

        You should look into the HockeyApp plugin. I use it to log all kinds of errors to a centralized server including startup crashes.

      • Clarence Tew commented  ·   ·  Flag as inappropriate

        Nice post and excellent to view the writers. We are supplying valuable information to the students at online. Our writing service is having experienced workers for making all types of projects is powerful way. You can move your writing papers with quality from https://www.catchyessays.com/contact_us.php .

      Feedback and Knowledge Base