The DOMException class

(PHP 5, PHP 7, PHP 8)

简介

DOM operations raise exceptions under particular circumstances, i.e., when an operation is impossible to perform for logical reasons.

See also 异常.

类摘要

finalclassDOMExceptionextendsException {
publicint$code;
protectedstring$message = "";
privatestring$string = "";
protectedint$code;
protectedstring$file = "";
protectedint$line;
privatearray$trace = [];
private?Throwable$previous = null;
publicException::__construct(string$message = "", int$code = 0, ?Throwable$previous = null)
finalpublicException::getCode(): int
finalpublicException::getLine(): int
}

属性

code

An integer indicating the type of error generated

To Top