[gdome]Exception Codes again



Dear Paolo and other contributors,

thanks for your work on the 0.7.0 release.
This weekend I finally got around to work on the update of my wrappers.

The wrappers have to initialize variables of type GdomeException, pass
pointers to these variables to the libgdome functions, and check if an
exception occurred after the libgdome function returns.  Nothing else than
what an application, using libgdome directly, would do.

In previous releases, the wrappers relied on the IDL definitions, that
define what methods can raise Exceptions at all.  This was incorrect
behaviour, since all DOM methods may raise exceptions in special cases.
This became obvious during the discussion of referenced DOM nodes in
detached subtrees.

So correct behaviour would be to check for exceptions after every libgdome
function call.

According to my mail from Nov 21, I changed the wrapper code to initialize
the exception tracking variable with (GdomeException)(-1).  I now use -1
instead of 0, which I used earlier for this purpose, because 0 is already
in use:  It indicates UNSPECIFIED_EVENT_TYPE_ERR in the `events' module.

While doing these changes to the code that calls gdome_n_ref, I realized
that the gdome_n_ref function sets
*exc = 0;
if no exception occurs.  That means, it would trigger a
UNSPECIFIED_EVENT_TYPE_ERR exception in my wrappers if I implemented them
as planned.

Then I checked your exception code for UNSPECIFIED_EVENT_TYPE_ERR, and
found that you set it to 257.

?????

I suppose this is a setting that you used for some tests, and it managed
to somehow creep into the release.

Could you please replace this with 0 again, and probably introduce a
constant that indicates "no exception occured", which your users can use
to initialize their exception tracking variables, and to check for
inequality (to determine that an exception occured).

Thank you very much,

Tobias





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]