axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samisa Abeysinghe" <>
Subject Exception model
Date Mon, 04 Jul 2005 05:22:08 GMT
Hi All,
            PFA the class diagram of current exception model we have.
            Looking into the several issues we have against the
exception model, it is worth considering a re-arrangement here.
            The idea is *very* simple here.  (basic OO stuff)
1.       We have m_sMessage and m_iExceptionCode as data members in all
the derived classes - move them to base class. Move the access methods
to the base class as well.
2.       Drop all processException() methods and move the logic to
3.       getMessage() methods in the derived classes do not get the
message rather return the message corresponding to the exception code.
Hence rename getMessage() getMessageForExceptionCode()
4.       We have "what()" in the base class to get the error message.
This is a virtual method inherited from the 'exception' class hence we
cannot change the naming. However, better to have a more sensible name
like getMessage to wrap this
5.       There are too many constructors in the derived classes, I would
like only two constructors for each class
a.       Copy constructor
b.       Constructor with 2 parameters, exception code and message, with
message defaulting to null. ExceptionClass(int code, char* msg = null)

View raw message