Returns the Exception associated with the failed heartbeat

- « MongoDB\Driver\Monitoring\ServerHeartbeatFailedEvent::getDurationMicros

- MongoDB\Driver\Monitoring\ServerHeartbeatFailedEvent::getHost »

- PHP Manual
- MongoDB\Driver\Monitoring\ServerHeartbeatFailedEvent
- Returns the Exception associated with the failed heartbeat

# MongoDB\Driver\Monitoring\ServerHeartbeatFailedEvent::getError

(mongodb >=1.13.0)

MongoDB\Driver\Monitoring\ServerHeartbeatFailedEvent::getError — Returns the Exception associated with the failed heartbeat

### Description

final public MongoDB\Driver\Monitoring\ServerHeartbeatFailedEvent::getError(): Exception

### Parameters

This function has no parameters.

### Return Values

Returns the Exception associated with the failed heartbeat.

### Errors/Exceptions

- Throws MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors.