php8.5
Home/ Manual/ reference / pdo/ The PDOException class

The PDOException class

Represents an error raised by PDO. You should not throw a PDOException from your own code. See Exceptions for more information about Exceptions in PHP.

Intro

Represents an error raised by PDO. You should not throw a PDOException from your own code. See Exceptions for more information about Exceptions in PHP.

Class synopsis

extends RuntimeException { }

Properties

errorInfo

Corresponds to PDO::errorInfo or PDOStatement::errorInfo

code

SQLSTATE error code. Use Exception::getCode to access it.

Source: reference/pdo/pdoexception.xml · from the official PHP manual (php/doc-en)