build(deps-dev): apply updates
[e-mobility-charging-stations-simulator.git] / src / performance / storage / StorageFactory.ts
index 5a3b2e128d896fc4fb6294dd3ff4ee505cb28ddf..1c109e1be628bfe4bf99d4499ae6227cd8a200d7 100644 (file)
@@ -1,7 +1,11 @@
 // Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
 
+import { JsonFileStorage } from './JsonFileStorage';
+import { MikroOrmStorage } from './MikroOrmStorage';
+import { MongoDBStorage } from './MongoDBStorage';
+import type { Storage } from './Storage';
+import { BaseError } from '../../exception';
 import { StorageType } from '../../types';
-import { JsonFileStorage, MikroOrmStorage, MongoDBStorage, type Storage } from '../internal';
 
 export class StorageFactory {
   private constructor() {
@@ -23,7 +27,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;
   }