The SNMPException class

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

Introduction

Represents an error raised by SNMP. You should not throw a SNMPException from your own code. See Exceptions for more information about Exceptions in PHP.

Class synopsis

classSNMPExceptionextendsRuntimeException {
protectedstring$message = "";
privatestring$string = "";
protectedint$code;
protectedstring$file = "";
protectedint$line;
privatearray$trace = [];
private?Throwable$previous = null;
publicException::__construct(string$message = "", int$code = 0, ?Throwable$previous = null)
finalpublicException::getCode(): int
finalpublicException::getLine(): int
}

Properties

code

SNMP library error code. Use Exception::getCode() to access it.

To Top