From a55036e7d09e2a512293f7433624a4c110245cbe Mon Sep 17 00:00:00 2001 From: Bingus_Violet Date: Wed, 14 Feb 2024 10:53:50 -0600 Subject: [PATCH] Prevent searchless crashing --- index.js | 14 +++++++------- resources/mainPage.html | 2 +- resources/searchPage.html | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/index.js b/index.js index fc69c6c..8acf44c 100644 --- a/index.js +++ b/index.js @@ -140,10 +140,10 @@ app.get("/search", async (req, res) => { res.write(addedHTML + html.substring(html.indexOf("{RESULTS}") + 9), () => {res.end()}) }) -// process.on('uncaughtException', (err, origin) => { -// fs.writeSync( -// process.stderr.fd, -// `Caught exception: ${err}\n` + -// `Exception origin: ${origin}`, -// ); -// }); \ No newline at end of file +process.on('uncaughtException', (err, origin) => { + fs.writeSync( + process.stderr.fd, + `Caught exception: ${err}\n` + + `Exception origin: ${origin}`, + ); +}); \ No newline at end of file diff --git a/resources/mainPage.html b/resources/mainPage.html index 029a6c5..5bbcd7c 100644 --- a/resources/mainPage.html +++ b/resources/mainPage.html @@ -19,7 +19,7 @@
- +
diff --git a/resources/searchPage.html b/resources/searchPage.html index f77e022..af17bb3 100644 --- a/resources/searchPage.html +++ b/resources/searchPage.html @@ -19,7 +19,7 @@
- +