axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject cvs commit: ws-axis/c/src/transport/axis3 ChannelFactory.cpp
Date Tue, 28 Jun 2005 08:37:02 GMT
samisa      2005/06/28 01:37:02

  Modified:    c/src/engine HandlerLoader.cpp SOAPTransportFactory.cpp
                        XMLParserFactory.cpp
               c/src/transport/axis3 ChannelFactory.cpp
  Log:
  Included the logic to have better error messages in case of errors on loading libs.
  Used GETLASTERROR and PLATFORM_GET_ERROR_MESSAGE
  Fix for AXISCPP-548
  
  Revision  Changes    Path
  1.36      +13 -1     ws-axis/c/src/engine/HandlerLoader.cpp
  
  Index: HandlerLoader.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/HandlerLoader.cpp,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- HandlerLoader.cpp	23 Mar 2005 15:44:58 -0000	1.35
  +++ HandlerLoader.cpp	28 Jun 2005 08:37:02 -0000	1.36
  @@ -86,7 +86,19 @@
       if (!pHandlerInfo->m_Handler)
       {
           AXISTRACE1("SERVER_ENGINE_LIBRARY_LOADING_FAILED", CRITICAL);
  -        throw AxisEngineException(SERVER_ENGINE_LIBRARY_LOADING_FAILED, PLATFORM_LOADLIB_ERROR);
  +
  +        long dwError = GETLASTERROR
  +        string *    message = PLATFORM_GET_ERROR_MESSAGE( dwError);
  +        char        fullMessage[1024];
  +        sprintf(fullMessage,
  +                "Failed to load handler within server engine: \n \
  +                Error Message='%s'\
  +                Error Code='%d'\n",
  +                message->c_str(), (int) dwError);
  +
  +        delete( message);
  +
  +        throw AxisEngineException(SERVER_ENGINE_LIBRARY_LOADING_FAILED, fullMessage);
       }
   
       return AXIS_SUCCESS;
  
  
  
  1.29      +12 -1     ws-axis/c/src/engine/SOAPTransportFactory.cpp
  
  Index: SOAPTransportFactory.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/SOAPTransportFactory.cpp,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- SOAPTransportFactory.cpp	27 May 2005 10:25:59 -0000	1.28
  +++ SOAPTransportFactory.cpp	28 Jun 2005 08:37:02 -0000	1.29
  @@ -126,7 +126,18 @@
       if (!m_LibHandler)
       {
           AXISTRACE1("SERVER_ENGINE_LOADING_TRANSPORT_FAILED", CRITICAL);
  -        throw AxisEngineException(SERVER_ENGINE_LOADING_TRANSPORT_FAILED, PLATFORM_LOADLIB_ERROR);
  +        long dwError = GETLASTERROR
  +        string *    message = PLATFORM_GET_ERROR_MESSAGE( dwError);
  +        char        fullMessage[1024];
  +        sprintf(fullMessage,
  +                "Failed to load transport within server engine: \n \
  +                Error Message='%s'\
  +                Error Code='%d'\n",
  +                message->c_str(), (int) dwError);
  +
  +        delete( message);
  +
  +        throw AxisEngineException(SERVER_ENGINE_LOADING_TRANSPORT_FAILED, fullMessage);
       }
       return AXIS_SUCCESS;
   }
  
  
  
  1.25      +13 -1     ws-axis/c/src/engine/XMLParserFactory.cpp
  
  Index: XMLParserFactory.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/engine/XMLParserFactory.cpp,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- XMLParserFactory.cpp	13 May 2005 16:06:58 -0000	1.24
  +++ XMLParserFactory.cpp	28 Jun 2005 08:37:02 -0000	1.25
  @@ -122,7 +122,19 @@
       if (!m_LibHandler)
       {
           AXISTRACE1("SERVER_ENGINE_LOADING_PARSER_FAILED" , CRITICAL);
  -        throw AxisEngineException(SERVER_ENGINE_LOADING_PARSER_FAILED, PLATFORM_LOADLIB_ERROR);
  +
  +        long dwError = GETLASTERROR
  +        string *    message = PLATFORM_GET_ERROR_MESSAGE( dwError);
  +        char        fullMessage[1024];
  +        sprintf(fullMessage,
  +                "Failed to load parser within server engine: \n \
  +                Error Message='%s'\
  +                Error Code='%d'\n",
  +                message->c_str(), (int) dwError);
  +
  +        delete( message);
  +
  +        throw AxisEngineException(SERVER_ENGINE_LOADING_PARSER_FAILED, fullMessage);
       }
   
       return AXIS_SUCCESS;
  
  
  
  1.17      +25 -2     ws-axis/c/src/transport/axis3/ChannelFactory.cpp
  
  Index: ChannelFactory.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/transport/axis3/ChannelFactory.cpp,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- ChannelFactory.cpp	27 May 2005 10:25:59 -0000	1.16
  +++ ChannelFactory.cpp	28 Jun 2005 08:37:02 -0000	1.17
  @@ -67,7 +67,18 @@
   
   		if( !sLibHandler)
   		{
  -			throw HTTPTransportException( SERVER_TRANSPORT_LOADING_CHANNEL_FAILED, PLATFORM_LOADLIB_ERROR);
  +                        long dwError = GETLASTERROR
  +                        string *    message = PLATFORM_GET_ERROR_MESSAGE( dwError);
  +                        char        fullMessage[1024];
  +                        sprintf(fullMessage,
  +                                "Failed to load transport channel within server engine:
\n \
  +                                 Error Message='%s'\
  +                                 Error Code='%d'\n",
  +                                 message->c_str(), (int) dwError);
  +
  +                        delete( message);
  +
  +			throw HTTPTransportException( SERVER_TRANSPORT_LOADING_CHANNEL_FAILED, fullMessage);
   		}
   		else
   		{
  @@ -190,7 +201,19 @@
   	if( !pCh->m_Library)
   	{
   		delete pCh;
  -		throw HTTPTransportException( SERVER_TRANSPORT_LOADING_CHANNEL_FAILED, PLATFORM_LOADLIB_ERROR);
  +           
  +                long dwError = GETLASTERROR
  +                string *    message = PLATFORM_GET_ERROR_MESSAGE( dwError);
  +                char        fullMessage[1024];
  +                sprintf(fullMessage,
  +                        "Failed to load transport channel within server engine: \n \
  +                         Error Message='%s'\
  +                         Error Code='%d'\n",
  +                         message->c_str(), (int) dwError);
  +
  +                delete( message);
  +
  +		throw HTTPTransportException( SERVER_TRANSPORT_LOADING_CHANNEL_FAILED, fullMessage);
   	}
   
   	pCh->m_Create = (CREATE_OBJECT3) PLATFORM_GETPROCADDR( pCh->m_Library, CREATE_FUNCTION3);
  
  
  

Mime
View raw message