> > Sorry Norbert for my ignorance, but how can I now each element of the
> enum
> > what value is ?
> > For example, -1 is ODBX_ERR_BACKEND ? where can I see that ?
>
> That's a little bit tricky if you don't know.
> An enum without explicit enumeration of the elements is enumerated
> automatically from zero on. This means that
>
> ODBX_ERR_SUCCESS => 0
> ODBX_ERR_BACKEND => 1
> ...
>
> The values returned by the OpenDBX library are negated:
> -ODBX_ERR_SUCCESS => 0
> -ODBX_ERR_BACKEND => -1
> ...
>
> This is something I would like to change in OpenDBX 2.0
>
>
Excellent. Now I got it.

Suppose I want to map from OpenDBX errors to SqueakDBX exceptions, I have to
do it with the index of the array then. So, if you then change, reorder or
whatever you do with the array, I will map wrong exceptions :(

It would be grate to define static numbers. I mean, numbers that do not
change.

That's the reason why you want to change that in OpenDBX 2.0? If you do
this, I will wait until that moment to map my exceptions to those errors.
Right now in SqueakDBX you rise a generic OpenDBXException which has a
instance variable which is the number.
But, perhaps, if a future I want to reify the exceptions, for example
OpenDBXNoMemoryException. For that work, I think I will wait for OpenDBX 2.0
if they numbers won't change.

Best,

Mariano



> > When I got -1 the description I get is the description of the error of
> the
> > backend isn't it ?
> > In any other case, the error I get is the description associated with the
> > enum dbxerr which is in static const char* odbx_errmsg[]   ???
>
> Exactly.
>
>
> Norbert
> --
> OpenPGP public key
> http://www.linuxnetworks.de/norbert.pubkey.asc
>
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> libopendbx-devel mailing list
> libopendbx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libopendbx-devel
> http://www.linuxnetworks.de/doc/index.php/OpenDBX
>
>
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
libopendbx-devel mailing list
libopendbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libopendbx-devel
http://www.linuxnetworks.de/doc/index.php/OpenDBX

Reply via email to