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