PDOException 锟届常锟斤拷

(PHP 5 >= 5.1.0, PHP 7)

锟斤拷锟�

锟斤拷锟斤拷一锟斤拷锟斤拷 PDO 锟斤拷锟斤拷锟侥达拷锟斤拷锟斤拷锟皆硷拷锟侥达拷锟诫不应锟阶筹拷一锟斤拷 PDOException 锟届常锟斤拷锟斤拷锟斤拷 PHP 锟届常锟侥革拷锟斤拷锟斤拷息锟斤拷渭锟� 锟届常 锟斤拷

锟斤拷摘要

PDOException extends RuntimeException {
/* 锟斤拷锟斤拷 */
public array $errorInfo ;
protected string $message ;
protected string $code ;
/* 锟教承的凤拷锟斤拷 */
final public Exception::getMessage ( void ) : string
final public Exception::getPrevious ( void ) : Throwable
final public Exception::getCode ( void ) : int
final public Exception::getFile ( void ) : string
final public Exception::getLine ( void ) : int
final public Exception::getTrace ( void ) : array
final public Exception::getTraceAsString ( void ) : string
public Exception::__toString ( void ) : string
final private Exception::__clone ( void ) : void
}

锟斤拷锟斤拷

errorInfo

锟洁当锟斤拷PDO::errorInfo() 锟斤拷 PDOStatement::errorInfo()

message

锟侥憋拷锟斤拷锟斤拷锟斤拷息锟斤拷锟斤拷 Exception::getMessage() 锟斤拷锟斤拷锟绞★拷

code

SQLSTATE 锟斤拷锟斤拷锟诫。锟斤拷Exception::getCode() 锟斤拷锟斤拷锟绞★拷