send client side javascript errors to the server

This commit is contained in:
Peter 'Pita' Martischka 2011-08-17 19:24:44 +01:00
parent b58bdb4e4d
commit c2457e06d8
2 changed files with 22 additions and 0 deletions

View file

@ -312,6 +312,16 @@ async.waterfall([
});
});
//The Etherpad client side sends information about client side javscript errors
app.post('/jserror', function(req, res)
{
new formidable.IncomingForm().parse(req, function(err, fields, files)
{
console.error("CLIENT SIDE JAVASCRIPT ERROR: " + fields.errorInfo);
res.end("OK");
});
});
//serve index.html under /
app.get('/', function(req, res)
{