Better use of try catch when processing result of snmp query