changed some stuff

This commit is contained in:
DJj123dj
2022-11-24 21:51:13 +01:00
parent 1d5830975f
commit f1dc8cbcf5
3 changed files with 38 additions and 33 deletions
+7 -3
View File
@@ -19,9 +19,13 @@ module.exports = () => {
/**@type {Error} */
const theError = err
if (api.enableAPIdebug){
const data = fs.readFileSync("./apiDebug.txt")
const newData = data ? data.toString() : ""
fs.writeFileSync("./apiDebug.txt",newData+"ERROR: "+theError.name+": "+theError.message+"\n"+theError.stack+"\n\n")
try {
const data = fs.readFileSync("./apiDebug.txt")
const newData = data ? data.toString() : ""
fs.writeFileSync("./apiDebug.txt",newData+"ERROR: "+theError.name+": "+theError.message+"\n"+theError.stack+"\n\n")
}catch{
fs.writeFileSync("./apiDebug.txt","ERROR: "+theError.name+": "+theError.message+"\n"+theError.stack+"\n\n")
}
}
failcount++
totalcount++