summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/zelfoverhoor/docent.js4
-rw-r--r--modules/zelfoverhoor/qs.js4
-rw-r--r--modules/zelfoverhoor/zelfoverhoor.js2
3 files changed, 5 insertions, 5 deletions
diff --git a/modules/zelfoverhoor/docent.js b/modules/zelfoverhoor/docent.js
index 2aef2e8..35d2da7 100644
--- a/modules/zelfoverhoor/docent.js
+++ b/modules/zelfoverhoor/docent.js
@@ -1,8 +1,8 @@
window.addEventListener("error",function(err){
- console.log(JSON.stringify(err));
+ var str=err.filename+":"+err.lineno+" "+err.error+": "+err.message;
var xhr=new XMLHttpRequest();
xhr.open("POST","/zelfoverhoor/error");
- xhr.send(JSON.stringify(err));
+ xhr.send(str);
});
var questionsets=null;
diff --git a/modules/zelfoverhoor/qs.js b/modules/zelfoverhoor/qs.js
index c07f8be..e9aedb5 100644
--- a/modules/zelfoverhoor/qs.js
+++ b/modules/zelfoverhoor/qs.js
@@ -1,8 +1,8 @@
window.addEventListener("error",function(err){
- console.log(JSON.stringify(err));
+ var str=err.filename+":"+err.lineno+" "+err.error+": "+err.message;
var xhr=new XMLHttpRequest();
xhr.open("POST","/zelfoverhoor/error");
- xhr.send(JSON.stringify(err));
+ xhr.send(str);
});
var setname=questionset.name;
diff --git a/modules/zelfoverhoor/zelfoverhoor.js b/modules/zelfoverhoor/zelfoverhoor.js
index d1d3068..766bffd 100644
--- a/modules/zelfoverhoor/zelfoverhoor.js
+++ b/modules/zelfoverhoor/zelfoverhoor.js
@@ -222,7 +222,7 @@ module.exports=function(app,io,_moddir){
app.post("/zelfoverhoor/error",function(req,res){
if(typeof req.body=="string"){
- fs.appendFile(moddir+"/errors.txt",req.body,function(err){
+ fs.appendFile(moddir+"/errors.txt",new Date().toString()+" "+req.body+"\n",function(err){
if(err)console.log(err);
});
}