GoLang SNMP::getError

request it (429)
GoLang replacement for PHP's SNMP::getError [edit | history]



Do you know a GoLang replacement for PHP's SNMP::getError? Write it!

PHP SNMP::getError

PHP original manual for SNMP::getError [ show | php.net ]

SNMP::getError

(PHP 5 >= 5.4.0, PHP 7)

SNMP::getErrorGet last error message

Description

public string SNMP::getError ( void )

Returns string with error from last SNMP request.

Return Values

String describing error from last SNMP request.

Examples

Example #1 SNMP::getError() example

<?php
$session 
= new SNMP(SNMP::VERSION_2c'127.0.0.1''boguscommunity');
var_dump(@$session->get('.1.3.6.1.2.1.1.1.0'));
var_dump($session->getError());
?>

The above example will output:

bool(false)
string(26) "No response from 127.0.0.1"

See Also