X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fabstract-pool.ts;h=72e830745558831db7933dfcfd5b6c8a03b35d78;hb=473c717a499d52ce8a069c43ee168b70cb5701f1;hp=c9b8c795737a85338686df733c39397c39595201;hpb=09c9445fa9d52c59af5eb06fb69ca1d92842d923;p=poolifier.git diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index c9b8c795..72e83074 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -126,11 +126,11 @@ export abstract class AbstractPool< 'Cannot instantiate a pool without specifying the number of workers' ) } else if (Number.isSafeInteger(numberOfWorkers) === false) { - throw new Error( + throw new TypeError( 'Cannot instantiate a pool with a non integer number of workers' ) } else if (numberOfWorkers < 0) { - throw new Error( + throw new RangeError( 'Cannot instantiate a pool with a negative number of workers' ) } else if (this.type === PoolType.FIXED && numberOfWorkers === 0) {