Run sonar cloud with current node.js LTS version
[e-mobility-charging-stations-simulator.git] / src / performance / storage / JSONFileStorage.ts
index 7b3633a78a338a519d64c6b796701506cf3f4316..7e23365ef77212cab7cf9f8ef690d214edad9ef7 100644 (file)
@@ -39,7 +39,7 @@ export class JSONFileStorage extends Storage {
             'utf8'
           );
         } catch (error) {
-          FileUtils.handleFileException(this.logPrefix, Constants.PERFORMANCE_RECORDS_FILETYPE, this.dbName, error);
+          FileUtils.handleFileException(this.logPrefix, Constants.PERFORMANCE_RECORDS_FILETYPE, this.dbName, error as NodeJS.ErrnoException);
         }
         await release();
       })
@@ -52,7 +52,7 @@ export class JSONFileStorage extends Storage {
         this.fd = fs.openSync(this.dbName, 'a+');
       }
     } catch (error) {
-      FileUtils.handleFileException(this.logPrefix, Constants.PERFORMANCE_RECORDS_FILETYPE, this.dbName, error);
+      FileUtils.handleFileException(this.logPrefix, Constants.PERFORMANCE_RECORDS_FILETYPE, this.dbName, error as NodeJS.ErrnoException);
     }
   }
 
@@ -63,7 +63,7 @@ export class JSONFileStorage extends Storage {
         this.fd = null;
       }
     } catch (error) {
-      FileUtils.handleFileException(this.logPrefix, Constants.PERFORMANCE_RECORDS_FILETYPE, this.dbName, error);
+      FileUtils.handleFileException(this.logPrefix, Constants.PERFORMANCE_RECORDS_FILETYPE, this.dbName, error as NodeJS.ErrnoException);
     }
   }