The DOMException class

Introduction

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

See also Exceptions.

Class synopsis

final DOMException
extends Exception
/* Properties */
public int $code;
/* Inherited properties */
protected string $message = "";
private string $string = "";
protected int $code;
protected string $file = "";
protected int $line;
private array $trace = [];
private Throwablenull $previous = null;
/* Inherited methods */
public __construct(string $message = "", int $code = 0, Throwablenull $previous = null)
final public string getMessage()
final public Throwablenull getPrevious()
final public int getCode()
final public string getFile()
final public int getLine()
final public array getTrace()
final public string getTraceAsString()
public string __toString()
private void __clone()

Properties

code

An integer indicating the type of error generated