W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
(PHP 5, PHP 7, PHP 8)
Exception是所有用戶級異常的基類。
class Exception implements Throwable {
/* 屬性 */
protected string $message = "";
private string $string = "";
protected int $code;
protected string $file = "";
protected int $line;
private array $trace = [];
private ?Throwable $previous = null;
/* 方法 */
public __construct(string $message = "", int $code = 0, ?Throwable $previous = null)
final public getMessage(): string
final public getPrevious(): ?Throwable
final public getCode(): int
final public getFile(): string
final public getLine(): int
final public getTrace(): array
final public getTraceAsString(): string
public __toString(): string
private __clone(): void
}
異常消息內容
異常代碼
拋出異常的文件名
拋出異常在該文件中的行號
之前拋出的異常
字符串形式的堆棧跟蹤
數(shù)組形式的堆棧跟蹤
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: