[gdome]proposal for exceptions clean up



Hi.

the following is a proposal to clean up a little bit constants for
exceptions.

I would create another class of exceptions (GdomeExceptionType) for
Gdome2 specific exceptions, say

  GDOME_IMPLEMENTATION_EXCEPTION

I would move

  GDOME_NOEXCEPTION_ERR
  GDOME_NULL_POINTER_ERR

into that class. I would also create a macro

  GDOME_EXCEPTION(type,code)

that could be used to create an exception index given its class and its
code. I've also noticed that exceptions for the xpath module don't follow
the convention. They would become

  GDOME_INVALID_EXPRESSION_ERR = GDOME_EXCEPTION(GDOME_XPATH_EXCEPTION, 1)
  GDOME_TYPE_ERR               = GDOME_EXCEPTION(GDOME_XPATH_EXCEPTION, 2)

If you agree on this I can proceed with the modifications. No code should
be affected at all, provided the constants are used, and not the numbers
directly.

luca





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