X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fperformance%2Fstorage%2FStorage.ts;h=39d0a1b30250b80fd825351f4d476792ef89a3a6;hb=64c14c99f9902d4e96f2a2cd404e536e0584a629;hp=bdf7acb1d43617bf177a19cba0a6cb1c0d8a04b5;hpb=30695dcf67470f149e349d196b3d016482d11a17;p=e-mobility-charging-stations-simulator.git diff --git a/src/performance/storage/Storage.ts b/src/performance/storage/Storage.ts index bdf7acb1..39d0a1b3 100644 --- a/src/performance/storage/Storage.ts +++ b/src/performance/storage/Storage.ts @@ -9,7 +9,7 @@ import { type Statistics, StorageType } from '../../types/index.js' -import { logger, setDefaultErrorParams } from '../../utils/index.js' +import { logger } from '../../utils/index.js' export abstract class Storage { protected readonly storageUri: URL @@ -22,7 +22,7 @@ export abstract class Storage { this.logPrefix = logPrefix } - protected handleDBError ( + protected handleDBStorageError ( type: StorageType, error: Error, table?: string, @@ -31,7 +31,13 @@ export abstract class Storage { consoleOut: false } ): void { - params = setDefaultErrorParams(params, { throwError: false, consoleOut: false }) + params = { + ...{ + throwError: false, + consoleOut: false + }, + ...params + } const inTableOrCollectionStr = table != null && ` in table or collection '${table}'` logger.error( `${this.logPrefix} ${this.getDBNameFromStorageType(type)} error '${