X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fperformance%2Fstorage%2FStorageFactory.ts;h=cecaa48901bf3689475503d431891edd9e41c518;hb=769d3b106c5e4744487bc633da4e4ee93f8f1bf4;hp=5a3b2e128d896fc4fb6294dd3ff4ee505cb28ddf;hpb=2896e06dc8d72adf7150b23c941079f622f6f37c;p=e-mobility-charging-stations-simulator.git diff --git a/src/performance/storage/StorageFactory.ts b/src/performance/storage/StorageFactory.ts index 5a3b2e12..cecaa489 100644 --- a/src/performance/storage/StorageFactory.ts +++ b/src/performance/storage/StorageFactory.ts @@ -1,7 +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 { BaseError } from '../../exception'; import { StorageType } from '../../types'; -import { JsonFileStorage, MikroOrmStorage, MongoDBStorage, type Storage } from '../internal'; export class StorageFactory { private constructor() { @@ -23,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; }