fix: various fixes to files handling and their content caching
[e-mobility-charging-stations-simulator.git] / src / performance / storage / StorageFactory.ts
index 09b58a15ffcda6b84363216bc2868eb84e6eb09f..1c109e1be628bfe4bf99d4499ae6227cd8a200d7 100644 (file)
@@ -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;
   }