axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject cvs commit: ws-axis/c/samples/server/rpcfault AxisDivByZeroException.cpp AxisDivByZeroException.h
Date Tue, 18 May 2004 10:14:02 GMT
damitha     2004/05/18 03:14:02

  Added:       c/samples/server/rpcfault AxisDivByZeroException.cpp
                        AxisDivByZeroException.h
  Log:
  
  
  Revision  Changes    Path
  1.1                  ws-axis/c/samples/server/rpcfault/AxisDivByZeroException.cpp
  
  Index: AxisDivByZeroException.cpp
  ===================================================================
  /* -*- C++ -*- */
  /*
   *   Copyright 2003-2004 The Apache Software Foundation.
   *
   *   Licensed under the Apache License, Version 2.0 (the "License");
   *   you may not use this file except in compliance with the License.
   *   You may obtain a copy of the License at
   *
   *       http://www.apache.org/licenses/LICENSE-2.0
   *
   *   Unless required by applicable law or agreed to in writing, software
   *   distributed under the License is distributed on an "AS IS" BASIS,
   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *   See the License for the specific language governing permissions and
   *   limitations under the License.
   *
   * 
   * @author  wsdl2ws generated
   *
   */
  
  #include "AxisDivByZeroException.h"
  #include <exception>
  using namespace std;
  
  /**
   *    Default when no parameter passed. When thrown with no parameter
   *    more general AXISC_DIVBYZERO_EXCEPTION is assumed.
  */
  
  AxisDivByZeroException::AxisDivByZeroException()
  {
      m_sMessage = "";
  }
  
  AxisDivByZeroException::AxisDivByZeroException (int iExceptionCode)
  {
      m_iExceptionCode = iExceptionCode;
      processException (iExceptionCode);
  }
  
  AxisDivByZeroException::AxisDivByZeroException (exception* e)
  {
      processException (e);
  }
  
  AxisDivByZeroException::AxisDivByZeroException (exception* e, int iExceptionCode)
  {
      processException (e, iExceptionCode);
  }
  
  AxisDivByZeroException::~AxisDivByZeroException() throw ()
  {
  
  }
  
  void AxisDivByZeroException::processException (exception* e, int iExceptionCode)
  {
      m_sMessage = getMessage (e) + getMessage (iExceptionCode);
  }
  
  void AxisDivByZeroException::processException (exception* e)
  {
      m_sMessage = getMessage (e);
  }
  
  void AxisDivByZeroException::processException(int iExceptionCode)
  {
      m_sMessage = getMessage (iExceptionCode);
  }
  
  const string AxisDivByZeroException::getMessage (exception* objException)
  {
      string sMessage = objException->what();
  
      return sMessage;
  }
  
  const string AxisDivByZeroException::getMessage (int iExceptionCode)
  {
  }
  
  const char* AxisDivByZeroException::what() throw ()
  {
      return m_sMessage.c_str ();
  }
  
  const int AxisDivByZeroException::getExceptionCode()
  {
      return m_iExceptionCode;
  }
  
  
  
  
  1.1                  ws-axis/c/samples/server/rpcfault/AxisDivByZeroException.h
  
  Index: AxisDivByZeroException.h
  ===================================================================
  /*
   *   Copyright 2003-2004 The Apache Software Foundation.
   *
   *   Licensed under the Apache License, Version 2.0 (the "License");
   *   you may not use this file except in compliance with the License.
   *   You may obtain a copy of the License at
   *
   *       http://www.apache.org/licenses/LICENSE-2.0
   *
   *   Unless required by applicable law or agreed to in writing, software
   *   distributed under the License is distributed on an "AS IS" BASIS,
   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *   See the License for the specific language governing permissions and
   *   limitations under the License.
   *
   *
   *   @author wsdl2ws generated
   *
   */
   
  #ifndef __AXISDIVBYZEROEXCEPTION_H_OF_AXIS_INCLUDED_
  #define __AXISDIVBYZEROEXCEPTION_H_OF_AXIS_INCLUDED_
  
  #include <string>
  #include <exception>
  #include <axis/server/AxisException.h>
  #include "SOAPStructFault.h"
  
  using namespace std;
  
  class AxisDivByZeroException : public AxisException
  {
  
  public:
      AxisDivByZeroException();
      AxisDivByZeroException(int iExceptionCode);
      AxisDivByZeroException(exception* e);
      AxisDivByZeroException(exception* e, int iExceptionCode);
      virtual ~AxisDivByZeroException() throw();
      const char* what() throw();
      const int getExceptionCode();
      const string getMessage(exception* e);
      const string getMessage(int iExceptionCode);
                                                                                         
                                     
  private:
      void processException(exception* e);
      void processException(exception* e, int iExceptionCode);
      void processException(int iExceptionCode);
      string m_sMessage;
      int m_iExceptionCode;
  };
  
  #endif
  
  
  
  

Mime
View raw message