Get the last error encountered

- « GearmanWorker::echo

- GearmanWorker::getErrno »

- PHP Manual
- GearmanWorker
- Get the last error encountered

# GearmanWorker::error

(PECL gearman >= 0.5.0)

GearmanWorker::error — Get the last error encountered

### Description

public GearmanWorker::error(): string|false

Returns an error string for the last error encountered.

### Parameters

This function has no parameters.

### Return Values

A human readable error string, or `false` if there is no error message available.

### See Also

- GearmanWorker::getErrno() - Get errno