Skip to content

Commit 80472ab

Browse files
committed
Updated the error handler
1 parent 1e4db9c commit 80472ab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server/util/errorHandler.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ module.exports = (error) => {
55
const date = new Date().toLocaleString();
66
const lineStarter = fs.existsSync(filePath) ? "\n\n" : "# Found a bug? Report it here: https://github.com/gnmyt/myspeed/issues\n\n";
77

8+
console.error("An error occurred: " + error.message);
9+
810
fs.writeFile(filePath, lineStarter + "## " + date + "\n" + error, {flag: 'a+'}, err => {
911
if (err) console.error("Could not save error log file.", error);
1012

0 commit comments

Comments
 (0)