You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Samisa Abeysinghe <sa...@gmail.com> on 2005/06/30 12:04:29 UTC

Overloaded processException in AxisEngineException class

Hi All,
    We have several overloaded forms of processException in 
AxisEngineException class.

    I am sure that we are not using all of those. It is quite hard to
undestand and locate the problem locations when maintaining the
implementation. Shall we drop those that are not used from the list
below?

    void processException(const exception* e);
    void processException(const exception* e, const int iExceptionCode);
    void processException (const exception* e, char* pcMessage);
    void processException(const int iExceptionCode);
    void processException(const int iExceptionCode, char* pcMessage);  

    BTW, some can be replaced with the copy constructor. I think we
can drop the top 3 and keep the bottom 2. Sometime it is better to
KISS ;-)

Thanks,
Samisa...

Re: Overloaded processException in AxisEngineException class

Posted by Samisa Abeysinghe <sa...@virtusa.com>.
Yes, you are correct. Looks like the "processException" is doing what
the constructor should be doing. All these "processException" methods
are private to the class and only used internally to set the class data
members. 
We have 5 constructors and each has a corresponding "processException"
version which is called from within the constructor. What we should do
is to identify the useful constructors, move the logic from
'processException" to constructor and remove all unwanted constructors
and all "processException" methods.

Thanks,
Samisa...


On Thu, 2005-06-30 at 10:16, John Hawkins wrote:
> I've always questioned why we have processException in the first place
> ! I've never understood why you would want it. If the same fault is
> thrown by different processes then you would have to know which
> process call you were in to do anything useful. I have no idea why we
> don't just remove it. I think you should always handle exceptions in
> the calling program using try catch as usual.
> 
> 
> 
> 
> 
> Samisa Abeysinghe <sa...@gmail.com> wrote on 30/06/2005
> 11:04:29:
> 
> > Hi All,
> >     We have several overloaded forms of processException in 
> > AxisEngineException class.
> > 
> >     I am sure that we are not using all of those. It is quite hard
> to
> > undestand and locate the problem locations when maintaining the
> > implementation. Shall we drop those that are not used from the list
> > below?
> > 
> >     void processException(const exception* e);
> >     void processException(const exception* e, const int
> iExceptionCode);
> >     void processException (const exception* e, char* pcMessage);
> >     void processException(const int iExceptionCode);
> >     void processException(const int iExceptionCode, char*
> pcMessage);  
> > 
> >     BTW, some can be replaced with the copy constructor. I think we
> > can drop the top 3 and keep the bottom 2. Sometime it is better to
> > KISS ;-)
> > 
> > Thanks,
> > Samisa...
-- 
Samisa Abeysinghe <sa...@virtusa.com>
Virtusa Corporation

Re: Overloaded processException in AxisEngineException class

Posted by John Hawkins <HA...@uk.ibm.com>.
I've always questioned why we have processException in the first place ! 
I've never understood why you would want it. If the same fault is thrown 
by different processes then you would have to know which process call you 
were in to do anything useful. I have no idea why we don't just remove it. 
I think you should always handle exceptions in the calling program using 
try catch as usual.





Samisa Abeysinghe <sa...@gmail.com> wrote on 30/06/2005 
11:04:29:

> Hi All,
>     We have several overloaded forms of processException in 
> AxisEngineException class.
> 
>     I am sure that we are not using all of those. It is quite hard to
> undestand and locate the problem locations when maintaining the
> implementation. Shall we drop those that are not used from the list
> below?
> 
>     void processException(const exception* e);
>     void processException(const exception* e, const int iExceptionCode);
>     void processException (const exception* e, char* pcMessage);
>     void processException(const int iExceptionCode);
>     void processException(const int iExceptionCode, char* pcMessage); 
> 
>     BTW, some can be replaced with the copy constructor. I think we
> can drop the top 3 and keep the bottom 2. Sometime it is better to
> KISS ;-)
> 
> Thanks,
> Samisa...