summaryrefslogtreecommitdiff
path: root/modules/zelfoverhoor
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-11-25 16:42:28 +0100
committertomsmeding <tom.smeding@gmail.com>2017-11-25 16:42:28 +0100
commitd0c4361e579447189422c377ffc83614cbe865af (patch)
treec2940c00db88513fe28e9d7815e905d2d8c68fc1 /modules/zelfoverhoor
parent2193edfa40ef4e53342126ec1badc10338ae35b6 (diff)
zelfoverhoor: Fix HEAD^
Diffstat (limited to 'modules/zelfoverhoor')
-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);
});
}