Home/
Manual/
monitoring / commandsubscriber/ MongoDB\Driver\Monitoring\CommandSubscriber::commandFailed
MongoDB\Driver\Monitoring\CommandSubscriber::commandFailed
PHP function
Edit on GitHub ✎
(mongodb >=1.3.0)
Notification method for a failed command
Description
MongoDB\Driver\Monitoring\CommandSubscriber::commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event): void
If the subscriber is registered, this method is called when a command fails.
Parameters
event(MongoDB\Driver\Monitoring\CommandFailedEvent)An event object encapsulating information about the failed command.
Return Values
Void
Errors/Exceptions
See Also
MongoDB\Driver\Monitoring\CommandFailedEventMongoDB\Driver\Monitoring\addSubscriber()MongoDB\Driver\Manager::addSubscriber()- mongodb.tutorial.apm