Introducción
PHP Manual
PHP Manual»MongoDB\Driver\Exception»MongoDB\Driver\Exception\CommandException

La clase MongoDB\Driver\Exception\CommandException

(mongodb >= 1.5.0)

Lanzada cuando una orden falla.

class MongoDB\Driver\Exception\CommandException extends MongoDB\Driver\Exception\ServerException implements MongoDB\Driver\Exception\Exception {
/* Propiedades */
public readonly object $resultDocument;
/* Propiedades heredadas */
protected ?array $errorLabels;
protected string $message = "";
private string $string = "";
protected int $code;
protected string $file = "";
protected int $line;
private array $trace = [];
private ?Throwable $previous = null;
/* Métodos */
final public function getResultDocument(): object
/* Métodos heredados */
final public function Exception::getMessage(): string
final public function Exception::getPrevious(): ?Throwable
final public function Exception::getCode(): int
final public function Exception::getFile(): string
final public function Exception::getLine(): int
final public function Exception::getTrace(): array
final public function Exception::getTraceAsString(): string
public function Exception::__toString(): string
private function Exception::__clone(): void
}
resultDocument

El resultado del documento asociado a la orden fallida.

Versión Descripción
PECL mongodb 2.3.0 La propiedad resultDocument ahora es public readonly.

Tabla de contenidos

To Top