X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fperformance%2Fstorage%2FStorageFactory.ts;h=cecaa48901bf3689475503d431891edd9e41c518;hb=b3d7d65476a4ab586b3ccd188f0bfbe8452aba0e;hp=09b58a15ffcda6b84363216bc2868eb84e6eb09f;hpb=268a74bb051fcbbad532fd833f0d8fd2b33b6c64;p=e-mobility-charging-stations-simulator.git diff --git a/src/performance/storage/StorageFactory.ts b/src/performance/storage/StorageFactory.ts index 09b58a15..cecaa489 100644 --- a/src/performance/storage/StorageFactory.ts +++ b/src/performance/storage/StorageFactory.ts @@ -1,9 +1,11 @@ // 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'; export class StorageFactory { @@ -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; }