'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) {