[snmp] fix in SnmpContextv3Pool

tausif tausifk at hotmail.com
Wed Aug 30 11:08:32 BST 2006


Hi Birgit,

Thanks for the reply.
yes, In my openion also, it is better to throgh the exception. Let
it handle by client.

regards
Tausif

----- Original Message -----
From: "Birgit Arkesteijn" <birgit at westhawk.co.uk>
To: "List for discussion of the Westhawk SNMP stack"
<snmp at snmp.westhawk.co.uk>
Sent: Tuesday, August 29, 2006 9:47 PM
Subject: Re: [snmp] fix in SnmpContextv3Pool


> Hi Tausif,
>
> I tend to agree with you.
>
> I'm not sure why I pass on the other exceptions, such as PduException &
> IllegalArgumentException, but not the java.io.IOException .
> I like to think there was a reason, but I cannot remember which one.
>
> I'll remove all the try/catch wrappers around
>     context = getMatchingContext();
> in the Pool classes in the next release, unless someone give me a good
> reason not to.
>
> Thanks, Birgit
>
>
> On Tue, Aug 29, 2006 at 12:01:15PM -0000, tausif tausif wrote:
> >
> > Dear Birgit,
> >
> > I am using snmp5_1 version.
> >
> > The scenario was, for snmpget- V3, i created first the
> > SnmpContextv3Pool
> >
> > context = new SnmpContextv3Pool(host, port, bindAddr, socketType);
> > //the host is not reachable / does not exists.
> >
> > //seting of all other values like user name etc properly done!
> >
> > now in my start() method, the NullPointerException is thrown which is
> > wrong. It must be "java.io.IOException: Cannot find host "
> >
> > The reason was, In addPdu(Pdu pdu) throws java.io.IOException,
> > PduException, IllegalArgumentException{
> >
> > method, the java.io.IOException is caught (at line 408), but never
> > thrown back. we must throw it back to the client.
> >
> > Hope i made it clear now.
> >
> > Thanks & regards
> > Tausif
>
> --
> -- Birgit Arkesteijn, birgit at westhawk.co.uk,
> -- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
> -- tel.: +44 (0)161 237 0660
> -- <URL: http://www.westhawk.co.uk>
> _______________________________________________
> snmp mailing list
> snmp at snmp.westhawk.co.uk
> http://snmp.westhawk.co.uk/mailman/listinfo/snmp
>



More information about the snmp mailing list