Returns the Exception associated with the failed command

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

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

- PHP Manual
- MongoDB\Driver\Monitoring\CommandFailedEvent
- Returns the Exception associated with the failed command

# MongoDB\Driver\Monitoring\CommandFailedEvent::getError

(mongodb >=1.3.0)

MongoDB\Driver\Monitoring\CommandFailedEvent::getError — Returns the Exception associated with the failed command

### Description

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

### Parameters

This function has no parameters.

### Return Values

Returns the Exception associated with the failed command.

### Errors/Exceptions

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

### See Also

- Application Performance Monitoring (APM)