build(simulator): don't preserve modules
[e-mobility-charging-stations-simulator.git] / src / performance / storage / JsonFileStorage.ts
index e94d79b97d337826bcc4c7bc74d698d5211b1e04..50d1a8b925e0b46862c22c41d77b3fc1f9e5d078 100644 (file)
@@ -5,7 +5,7 @@ import path from 'node:path';
 
 import { Storage } from './Storage';
 import { FileType, type Statistics } from '../../types';
-import { AsyncLock, AsyncLockType, Constants, FileUtils, Utils } from '../../utils';
+import { AsyncLock, AsyncLockType, Constants, ErrorUtils, Utils } from '../../utils';
 
 export class JsonFileStorage extends Storage {
   private fd: number | null = null;
@@ -31,7 +31,7 @@ export class JsonFileStorage extends Storage {
         );
       })
       .catch((error) => {
-        FileUtils.handleFileException(
+        ErrorUtils.handleFileException(
           this.dbName,
           FileType.PerformanceRecords,
           error as NodeJS.ErrnoException,
@@ -52,7 +52,7 @@ export class JsonFileStorage extends Storage {
         this.fd = fs.openSync(this.dbName, 'a+');
       }
     } catch (error) {
-      FileUtils.handleFileException(
+      ErrorUtils.handleFileException(
         this.dbName,
         FileType.PerformanceRecords,
         error as NodeJS.ErrnoException,
@@ -68,7 +68,7 @@ export class JsonFileStorage extends Storage {
         this.fd = null;
       }
     } catch (error) {
-      FileUtils.handleFileException(
+      ErrorUtils.handleFileException(
         this.dbName,
         FileType.PerformanceRecords,
         error as NodeJS.ErrnoException,