The MongoDB\Driver\Exception\CommandException class

(mongodb >= 1.5.0)

Introduction

Thrown when a command fails.

Class synopsis

classMongoDB\Driver\Exception\CommandExceptionextendsMongoDB\Driver\Exception\ServerExceptionimplementsMongoDB\Driver\Exception\Exception {
protectedstring$message = "";
privatestring$string = "";
protectedint$code;
protectedstring$file = "";
protectedint$line;
privatearray$trace = [];
private?Throwable$previous = null;
finalpublicException::getCode(): int
finalpublicException::getLine(): int
}

Properties

resultDocument

The result document associated with the failed command.

Table of Contents

To Top