- if (snmp.get_next(pdu, target) != SNMP_CLASS_SUCCESS) {
- logger << "SNMPTable::SNMPTable() - failed to invoke Snmp::get_next (oid: '" << oid.get_printable() << "')" << std::endl;
+ if (int c = snmp.get_next(pdu, target) != SNMP_CLASS_SUCCESS) {
+ logger << "SNMPTable::SNMPTable() - failed to invoke Snmp::get_next (oid: '" << oid.get_printable() << "'). Error message: '" << Snmp::error_msg(c) << "'" << std::endl;