Improve OCPP error handling, fix performance storage default file path
[e-mobility-charging-stations-simulator.git] / src / performance / storage / MongoDBStorage.ts
similarity index 93%
rename from src/utils/performance-storage/MongoDBStorage.ts
rename to src/performance/storage/MongoDBStorage.ts
index d32038f5171378af1dabd68075eb9113741ba42e..851df0a1ba8248a582153056ce1bad688fd37d92 100644 (file)
@@ -1,6 +1,6 @@
 // Copyright Jerome Benoit. 2021. All Rights Reserved.
 
-import Constants from '../Constants';
+import Constants from '../../utils/Constants';
 import { MongoClient } from 'mongodb';
 import Statistics from '../../types/Statistics';
 import { Storage } from './Storage';
@@ -50,7 +50,7 @@ export class MongoDBStorage extends Storage {
 
   private checkDBConnection() {
     if (!this.connected) {
-      throw new Error(`${this.logPrefix} ${this.getDBTypeFromStorageType(StorageType.MONGO_DB)} connection not opened while trying to issue a request`);
+      throw new Error(`${this.logPrefix} ${this.getDBNameFromStorageType(StorageType.MONGO_DB)} connection not opened while trying to issue a request`);
     }
   }
 }