You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Nadir Amra <am...@us.ibm.com> on 2007/03/05 00:37:49 UTC

Re: Possible bug in exception handling.

Wayne,

Please  open a JIRA if one has not already been opened by you regarding 
this problem.

Nadir K. Amra


Wayne Johnson <wd...@yahoo.com> wrote on 02/26/2007 02:17:37 PM:

> I was having some problems whenever Axis threw an exception.  The 
> problem would corrupt the stack so that VC++ couldn't tell what or 
> where the crash occured.
> 
> I did find that there were some exceptions that may be at fault 
> (according to our c++ gurus).  It boils down to the fact that 
> exceptions must have a copy constructor that allows for a deep copy 
> of the data.
> 
> Before I filed a Jira, I wanted someone with a bit more experience 
> to say, "yah, that could be a problem".  I have a patch, that seems to 
help.
> 
> Here's the code I came up with:
> Index: c/src/common/AxisGenException.h
> ===================================================================
> --- c/src/common/AxisGenException.h     (revision 510578)
> +++ c/src/common/AxisGenException.h     (working copy)
> @@ -38,6 +38,11 @@
>      }
>         AxisGenException(const AxisException& e): AxisException (e) { }
>      virtual ~AxisGenException() throw() { }
> +
> +  AxisGenException(const AxisGenException &that)
> +  {
> +    this->setMessage(that.m_iExceptionCode, that.m_sMessage.c_str());
> +  }
>  };
> 
>  AXIS_CPP_NAMESPACE_END
> Index: c/src/transport/axis3/HTTPTransportException.hpp
> ===================================================================
> --- c/src/transport/axis3/HTTPTransportException.hpp    (revision 
510578)
> +++ c/src/transport/axis3/HTTPTransportException.hpp    (working copy)
> @@ -40,6 +40,11 @@
>      // constructor
>      HTTPTransportException(const AxisException& e): AxisException (e) { 
}
> 
> +    HTTPTransportException(const HTTPTransportException &that)
> +    {
> +      this->setMessage(that.m_iExceptionCode, that.m_sMessage.c_str());
> +    }
> +
>      // destructor
>      virtual ~HTTPTransportException() throw() { }
>  };
> 
> 
> 
> 
> --- 
> Wayne Johnson,             | There are two kinds of people: Those 
> 3943 Penn Ave. N.          | who say to God, "Thy will be done," 
> Minneapolis, MN 55412-1908 | and those to whom God says, "All right, 
> (612) 522-7003             | then, have it your way." --C.S. Lewis
>  Bored stiff? Loosen up...
> Download and play hundreds of games for free on Yahoo! Games.

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org