avoid printing an error when a watched file is removed

Massimo Melina committed Apr 26, 2022 at 13:53 UTC 0e0042b1dc514d0eb9a8efc740e53f2028ca0a60
2 files changed +2 -2
server/src/index.ts
+2 -1
@@ -39,7 +39,8 @@ function errorHandler(err:Error & { code:string, path:string }) {
39 }
40
41 process.on('uncaughtException', err => {
42 - console.error(err)
42 + if ((err as any).syscall !== 'watch')
43 + console.error(err)
44 })
45
46 subscribeConfig({ k: 'proxies', defaultValue: 0 }, n => {
todo.md
-1
@@ -1,6 +1,5 @@
1 # To do
2 - plugin.api.subscribeConfig
3 -- log exceptions
3 - watch certificates for change
4 - admin/fs: render virtual folders differently
5 - admin/config: hide advanced settings