Oidx in Agent++

Frank Fock Frank.Fock____t-online.de
Wed Jul 11 06:35:33 CEST 2001


Alex,

Portability is exactly the reason why SNMP++ and AGENT++
do not use exceptions.

Best regards,
Frank

Alex Finogenov wrote:

> Frank,
>
> Thank you for your reply.
>
> I assume that you keep exceptions away from your code for portability
> reasons, otherwise an exception seems to be a better way to communicate an
> erroneous condition.
>
> Thanks,
> Alex
>
> -----Original Message-----
> From: Frank.Fock____t-online.de [mailto:Frank.Fock____t-online.de]
> Sent: Tuesday, July 10, 2001 3:52 PM
> To: Alex Finogenov
> Cc: 'agentpp-dl____agentpp.com'
> Subject: Re: Oidx in Agent++
>
> Alex,
>
> You are right. The 0 is a valid sub-identifier. But what
> should these operations return when the OID is invalid?
> If you are not sure whether the OID you are processing
> is valid or not you should call Oidx::valid() before you
> call one of the below methods. They are just returning
> 0 to avoid crashes if invalid OIDs are used.
>
> Best regards,
> Frank
>
> Alex Finogenov wrote:
>
> > Frank,
> >
> > In the Agent++ "unsigned long Oidx::last()" and "unsigned long
> > Oidx::operator[]" return a value of 0 when the Oidx
> > object is in valid (valid() fails).
> >
> > Can't this create a problem since the value 0 is a valid value for a
> scalar
> > Oid's last subidentifier?
> >
> > Thanks,
> > Alex
>
> --
> Frank Fock - AGENT++
> Email: fock____agentpp.com
> Fax: +49 7195 177108

--
Frank Fock - AGENT++
Email: fock____agentpp.com
Fax: +49 7195 177108





More information about the AGENTPP mailing list