From: Jérôme Benoit Date: Mon, 14 Aug 2023 14:44:18 +0000 (+0200) Subject: refactor: refine pool startup error message X-Git-Tag: v2.6.26~36 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=8c6d4acf22398bf755be85612cf1e79f3dd5fbf7;p=poolifier.git refactor: refine pool startup error message Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 5633613e..eb303232 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -107,7 +107,7 @@ export abstract class AbstractPool< ) { if (!this.isMain()) { throw new Error( - 'Cannot start a pool from the same worker type as the current pool one' + 'Cannot start a pool from a worker with the same type as the pool' ) } this.checkNumberOfWorkers(this.numberOfWorkers) diff --git a/tests/pools/abstract/abstract-pool.test.js b/tests/pools/abstract/abstract-pool.test.js index 86522877..d5b10549 100644 --- a/tests/pools/abstract/abstract-pool.test.js +++ b/tests/pools/abstract/abstract-pool.test.js @@ -34,7 +34,7 @@ describe('Abstract pool test suite', () => { } ) ).toThrowError( - 'Cannot start a pool from the same worker type as the current pool one' + 'Cannot start a pool from a worker with the same type as the pool' ) })