From be4fc1570b718c00928490c8cfdd591df68f7186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Thu, 21 Nov 2024 11:32:49 +0100 Subject: [PATCH] log oplookup error --- shared/api/utils/shared_doc_util.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/shared/api/utils/shared_doc_util.js b/shared/api/utils/shared_doc_util.js index c035efd..9ec37f0 100644 --- a/shared/api/utils/shared_doc_util.js +++ b/shared/api/utils/shared_doc_util.js @@ -292,7 +292,15 @@ export default class SharedDocUtil extends SharedUtil if (fs.existsSync(this.opLookupFilename)) { let removeOps = []; - const fileLookUp = jsonfile.readFileSync(this.opLookupFilename); + let fileLookUp = null; + try + { + fileLookUp = jsonfile.readFileSync(this.opLookupFilename); + } + catch (e) + { + this._log.error("error reading oplookup file", this.opLookupFilename, e); + } if (fileLookUp && fileLookUp.ids && fileLookUp.names) { const idsAndNames = {};