repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: refine error message at pool instantiation inside a worker
[poolifier.git]
/
src
/
pools
/
abstract-pool.ts
diff --git
a/src/pools/abstract-pool.ts
b/src/pools/abstract-pool.ts
index 8332d31aefb2a9d91fac99bcea3a1d3690883be6..5633613ecebdda8cb763c7922588ebc504be4fc7 100644
(file)
--- a/
src/pools/abstract-pool.ts
+++ b/
src/pools/abstract-pool.ts
@@
-106,7
+106,9
@@
export abstract class AbstractPool<
protected readonly opts: PoolOptions<Worker>
) {
if (!this.isMain()) {
protected readonly opts: PoolOptions<Worker>
) {
if (!this.isMain()) {
- throw new Error('Cannot start a pool from a worker!')
+ throw new Error(
+ 'Cannot start a pool from the same worker type as the current pool one'
+ )
}
this.checkNumberOfWorkers(this.numberOfWorkers)
this.checkFilePath(this.filePath)
}
this.checkNumberOfWorkers(this.numberOfWorkers)
this.checkFilePath(this.filePath)