refactor: rename Storage.handleDBError -> Storage.handleDBStorageError
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 7 Jun 2024 15:49:59 +0000 (17:49 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 7 Jun 2024 15:49:59 +0000 (17:49 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
src/performance/storage/MikroOrmStorage.ts
src/performance/storage/MongoDBStorage.ts
src/performance/storage/Storage.ts

index 7b4545bdff36ba824597c22549889641c6f60538..7269ce76dae82587822e38cfafd485e3aca03e64 100644 (file)
@@ -28,7 +28,11 @@ export class MikroOrmStorage extends Storage {
         }))
       } satisfies PerformanceRecord)
     } catch (error) {
         }))
       } satisfies PerformanceRecord)
     } catch (error) {
-      this.handleDBError(this.storageType, error as Error, Constants.PERFORMANCE_RECORDS_TABLE)
+      this.handleDBStorageError(
+        this.storageType,
+        error as Error,
+        Constants.PERFORMANCE_RECORDS_TABLE
+      )
     }
   }
 
     }
   }
 
@@ -46,7 +50,7 @@ export class MikroOrmStorage extends Storage {
         }
       }
     } catch (error) {
         }
       }
     } catch (error) {
-      this.handleDBError(this.storageType, error as Error)
+      this.handleDBStorageError(this.storageType, error as Error)
     }
   }
 
     }
   }
 
@@ -58,7 +62,7 @@ export class MikroOrmStorage extends Storage {
         delete this.orm
       }
     } catch (error) {
         delete this.orm
       }
     } catch (error) {
-      this.handleDBError(this.storageType, error as Error)
+      this.handleDBStorageError(this.storageType, error as Error)
     }
   }
 
     }
   }
 
index 3d99284f4814dee29c4dd039c0d368f94ec2b83f..982e55bf682800ba02da10dc717bf6dea08fa736 100644 (file)
@@ -29,7 +29,11 @@ export class MongoDBStorage extends Storage {
           upsert: true
         })
     } catch (error) {
           upsert: true
         })
     } catch (error) {
-      this.handleDBError(StorageType.MONGO_DB, error as Error, Constants.PERFORMANCE_RECORDS_TABLE)
+      this.handleDBStorageError(
+        StorageType.MONGO_DB,
+        error as Error,
+        Constants.PERFORMANCE_RECORDS_TABLE
+      )
     }
   }
 
     }
   }
 
@@ -40,7 +44,7 @@ export class MongoDBStorage extends Storage {
         this.connected = true
       }
     } catch (error) {
         this.connected = true
       }
     } catch (error) {
-      this.handleDBError(StorageType.MONGO_DB, error as Error)
+      this.handleDBStorageError(StorageType.MONGO_DB, error as Error)
     }
   }
 
     }
   }
 
@@ -52,7 +56,7 @@ export class MongoDBStorage extends Storage {
         this.connected = false
       }
     } catch (error) {
         this.connected = false
       }
     } catch (error) {
-      this.handleDBError(StorageType.MONGO_DB, error as Error)
+      this.handleDBStorageError(StorageType.MONGO_DB, error as Error)
     }
   }
 
     }
   }
 
index bdf7acb1d43617bf177a19cba0a6cb1c0d8a04b5..ccdbb3f835411c27521e1c17df33002d7cfd259a 100644 (file)
@@ -22,7 +22,7 @@ export abstract class Storage {
     this.logPrefix = logPrefix
   }
 
     this.logPrefix = logPrefix
   }
 
-  protected handleDBError (
+  protected handleDBStorageError (
     type: StorageType,
     error: Error,
     table?: string,
     type: StorageType,
     error: Error,
     table?: string,