W3Cschool
恭喜您成為首批注冊(cè)用戶(hù)
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
(PHP 5 >= 5.1.0, PHP 7, PHP 8)
代表一個(gè)由 PDO 產(chǎn)生的錯(cuò)誤。在自己的代碼不應(yīng)拋出一個(gè) PDOException 異常。關(guān)于 PHP 異常的更多信息請(qǐng)參見(jiàn) 異常 。
class PDOException extends RuntimeException {
/* 屬性 */
protected int|string $code;
public ?array $errorInfo = null;
/* 繼承的屬性 */
protected string $message = "";
private string $string = "";
protected int $code;
protected string $file = "";
protected int $line;
private array $trace = [];
private ?Throwable $previous = null;
/* 繼承的方法 */
public Exception::__construct(string $message = "", int $code = 0, ?Throwable $previous = null)
final public Exception::getMessage(): string
final public Exception::getPrevious(): ?Throwable
final public Exception::getCode(): int
final public Exception::getFile(): string
final public Exception::getLine(): int
final public Exception::getTrace(): array
final public Exception::getTraceAsString(): string
public Exception::__toString(): string
private Exception::__clone(): void
}
相當(dāng)于 PDO::errorInfo() 或 PDOStatement::errorInfo()
SQLSTATE
錯(cuò)誤碼。用 Exception::getCode() 來(lái)訪問(wèn)。
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: