MongoDB\Driver\Exception\RuntimeException 클래스
(mongodb >= 1.0.0)
소개
드라이버에 런타임 오류(예: » libmongoc의 내부 오류)가 발생하면 발생합니다.
클래스 개요
class MongoDB\Driver\Exception\RuntimeException extends RuntimeException implements MongoDB\Driver\Exception\Exception {
/* Properties */
protected ?array $errorLabels;
/* Inherited properties */
protected string $message = "";
private string $string = "";
protected int $code;
protected string $file = "";
protected int $line;
private array $trace = [];
private ?Throwable $previous = null;
/* Methods */
final public hasErrorLabel(string $errorLabel): bool
/* Inherited methods */
final public Exception::getMessage(): string
final public Exception::getPrevious(): ?Throwable
final public Exception::getCode(): int
final public Exception::getFile(): string
final public Exception::getLine(): int
final public Exception::getTrace(): array
final public Exception::getTraceAsString(): string
public Exception::__toString(): string
private Exception::__clone(): void
}
Properties
- errorLabels
- 예외와 함께 사용할 오류 레이블의 배열을 포함합니다. 예를 들어 오류 레이블을 사용하여
TransientTransactionError
레이블이 있는 경우 트랜잭션을 안전하게 재시도할 수 있는지 여부를 감지할 수 있습니다. 이errorLabels
속성을 수동으로 해석하는 대신 MongoDB\Driver\Exception\RuntimeException::hasErrorLabel()을 사용하여 특정 오류 레이블의 존재를 테스트해야 합니다.
변경 로그
버전 | 설명 |
---|---|
PECL mongodb 1.6.0 | MongoDB\Driver\Exception\RuntimeException::hasErrorLabel() 메서드 및 MongoDB\Driver\Exception\RuntimeException::errorLabels 속성이 추가되었습니다. |
목차
- MongoDB\Driver\Exception\RuntimeException::hasErrorLabel — 오류 레이블이 예외와 연결되었는지 여부를 반환합니다.