PDO
PHP Manual

La clase PDOException

Introducción

Representa un error generado por la PDO. No se debe lanzar un PDOException del código Ver Exceptions para más información acerca de las excepciones en PHP.

Clases sinopsis

PDOException extends RuntimeException {
/* Propiedades */
public array $errorInfo ;
protected string $message ;
protected string $code ;
/* Métodos heredados */
final public string Exception::getMessage ( void )
final public Exception Exception::getPrevious ( void )
final public int Exception::getCode ( void )
final public string Exception::getFile ( void )
final public int Exception::getLine ( void )
final público array Exception::getTrace ( void )
final public string Exception::getTraceAsString ( void )
public string Exception::__toString ( void )
final private void Exception::__clone ( void )
}

Propiedades

errorInfo

Corresponde a laPDO::errorInfo() o PDOStatement::errorInfo()

message

Mensaje de error textual. Exception::getMessage() para acceder a eso.

code

SQLSTATE código de error. Utilice Exception::getCode() para acceder a eso.


PDO
PHP Manual