refactor: refine error message
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 28 Jul 2023 11:12:19 +0000 (13:12 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 28 Jul 2023 11:12:19 +0000 (13:12 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/pools/abstract-pool.ts
tests/pools/abstract/abstract-pool.test.js

index 30b4d01f9846cd2c2327d5a52e4a6be594e8d62c..57c50861879c9a4225c502898958b9d33a4bbaa6 100644 (file)
@@ -186,7 +186,7 @@ export abstract class AbstractPool<
         )
       } else if (max === 0) {
         throw new RangeError(
-          'Cannot instantiate a dynamic pool with a pool size equal to zero'
+          'Cannot instantiate a dynamic pool with a maximum pool size equal to zero'
         )
       } else if (min === max) {
         throw new RangeError(
index 5ac704a60eff0a19588ffbbda41ff36a981021a6..af167214644e5bec7b3110aebea546c3fd340238 100644 (file)
@@ -147,7 +147,7 @@ describe('Abstract pool test suite', () => {
         new DynamicThreadPool(0, 0, './tests/worker-files/thread/testWorker.js')
     ).toThrowError(
       new RangeError(
-        'Cannot instantiate a dynamic pool with a pool size equal to zero'
+        'Cannot instantiate a dynamic pool with a maximum pool size equal to zero'
       )
     )
   })