Represents runtime failures raised while spawning, coordinating, or monitoring worker processes.
Description
This exception type is intended for operational failures that occur during process management, transport allocation, PID resolution, or wait handling. Callers MUST treat this exception as an execution-time failure rather than as an indication of invalid API usage. Library internals SHOULD use this exception when an operation is valid in principle but cannot be completed in the current runtime state.
Interfaces
Methods
Creates an exception for failed worker fork attempts.
Creates an exception for failures while resolving the current PID.
Creates an exception for runtimes that cannot support process forking.
Creates an exception for failures while allocating worker output transport.
Creates an exception for failures while waiting on multiple workers.
Creates an exception for failures while waiting on a specific worker.
Initializes the exception with a descriptive message.
Creates an exception for failed worker fork attempts.
public
static
forUnableToForkWorker() : self
Description
Worker creation MUST succeed before the library can continue process orchestration. If the underlying fork operation fails, this exception MUST be thrown to indicate that no valid worker process could be established.
Return values
Description
a new instance describing the fork failure
Creates an exception for failures while resolving the current PID.
public
static
forUndetectableProcessIdentifier() : self
Description
The library MUST be able to determine the current process identifier to distinguish master and worker execution contexts correctly. If PID detection fails, continued execution SHALL NOT be considered reliable.
Return values
Description
a new instance describing the PID detection failure
Creates an exception for runtimes that cannot support process forking.
public
static
forUnsupportedForking() : self
Description
The current runtime MUST provide the capabilities required for safe worker process creation. If those capabilities are unavailable, the library SHALL reject the operation by raising this exception.
Return values
Description
a new instance describing the unsupported runtime
Creates an exception for failures while allocating worker output transport.
public
static
forWorkerOutputAllocationFailure() : self
Description
Worker output transport resources MUST be allocated before output can be captured or monitored safely. If transport allocation fails, this exception SHALL indicate that the worker communication channel could not be prepared.
Return values
Description
a new instance describing the output transport allocation failure
Creates an exception for failures while waiting on multiple workers.
public
static
forWorkersWaitFailure(
string
$error) : self
Description
Group wait operations SHOULD reconcile all targeted workers in a predictable manner. If the aggregate wait operation fails, this exception MUST communicate the underlying error so the caller can handle the runtime failure explicitly.
Parameters
$error
:
string
Description
the low-level error message associated with the group wait failure
Return values
Description
a new instance describing the multi-worker wait failure
Creates an exception for failures while waiting on a specific worker.
public
static
forWorkerWaitFailure(
int
$workerPid,
string
$error) : self
Description
Waiting on an individual worker SHOULD complete successfully when the worker is under manager control. If the wait operation fails, the library SHALL raise this exception with contextual error information.
Parameters
$workerPid
:
int
Description
the process identifier of the worker that could not be awaited successfully
$error
:
string
Description
the low-level error message associated with the wait failure
Return values
Description
a new instance describing the worker wait failure
Initializes the exception with a descriptive message.
private
__construct(
string
$message) : mixed
Description
This constructor is private to enforce the use of named constructors for specific logic violation scenarios, ensuring that each exception instance is created with a clear and relevant message.
Parameters
$message
:
string