fix: fix gap in schedule periods in composeChargingSchedules()
[e-mobility-charging-stations-simulator.git] / src / performance / storage / StorageFactory.ts
index 3da997257cc20c99e0ed3f5184abbe7db5583d55..cecaa48901bf3689475503d431891edd9e41c518 100644 (file)
@@ -1,10 +1,12 @@
 // Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
 
 import { JsonFileStorage } from './JsonFileStorage';
+// eslint-disable-next-line @typescript-eslint/no-unused-vars
 import { MikroOrmStorage } from './MikroOrmStorage';
 import { MongoDBStorage } from './MongoDBStorage';
 import type { Storage } from './Storage';
-import { StorageType } from '../../types/Storage';
+import { BaseError } from '../../exception';
+import { StorageType } from '../../types';
 
 export class StorageFactory {
   private constructor() {
@@ -26,7 +28,7 @@ export class StorageFactory {
       //   storageInstance = new MikroOrmStorage(connectionUri, logPrefix, type);
       //   break;
       default:
-        throw new Error(`${logPrefix} Unknown storage type: ${type}`);
+        throw new BaseError(`${logPrefix} Unknown storage type: ${type}`);
     }
     return storageInstance;
   }