PHP Conference Japan 2024

SNMPException 類別

(PHP 5 >= 5.4.0, PHP 7, PHP 8)

簡介

表示 SNMP 引發的錯誤。您不應在自己的程式碼中拋出 SNMPException。有關 PHP 中例外的更多資訊,請參閱 例外

類別概要

class SNMPException extends RuntimeException {
/* 繼承的屬性 */
protected string $message = "";
private string $string = "";
protected int $code;
保護 字串 $file = "";
保護 整數 $line;
私有 陣列 $trace = [];
私有 ?Throwable $previous = null;
/* 繼承的方法 */
公開 Exception::__construct(字串 $message = "", 整數 $code = 0, ?Throwable $previous = null)
最終 公開 Exception::getMessage(): 字串
最終 公開 Exception::getCode(): 整數
最終 公開 Exception::getFile(): 字串
最終 公開 Exception::getLine(): 整數
最終 公開 Exception::getTrace(): 陣列
}

屬性

code

SNMP 函式庫錯誤碼。使用 Exception::getCode() 來存取它。

新增註解

使用者提供的備註

此頁面沒有使用者提供的備註。
To Top