[omniORB] Fw: Handling exceptions

TonyGoyarzu at gresham-computing.com.au TonyGoyarzu at gresham-computing.com.au
Mon Mar 14 15:19:14 GMT 2005


Hi everybody,

I'm trying to create an object that interfaces with our ORB object. An 
exception is thrown by the remote object when we try to log in.
If the remote object is configured properly this code works but if it's 
not I would like to catch the exception ... now the exception is not being 
passed to my code, somewhere down the line the exception is not handled 
and I get an 
"Debug assertion failed :_BLOCK_TYPE_IS_VALID(pHead->nBlockUse)" error 
message on the dbgdel.cpp file.

how can I handle the exception?
any help would be appreciated.


here is the code
        try
        {

        // .... previous code
 
        FK::Comkit::Service_Base_var positionService = 
gate->login(UserName, Password);
        if( CORBA::is_nil(positionService) ) 
        {
                _RPT0(_CRT_ERROR, "Login Failed.");
        }


        catch (FK::Comkit::EXCEPT& ex0) 
        {
                _RPT0(_CRT_ERROR, "xxx");
        }
        catch (CORBA::TRANSIENT& ex1) 
        {
                _RPT0(_CRT_ERROR, "xxx");
        }

        catch (FK::Comkit::Comkit_Exception & _exc2 )
        {
                _RPT0(_CRT_ERROR, "xxx");
        }
        catch (CORBA::Exception &ex3)
        {
                _RPT0(_CRT_ERROR, "xxx");
        }
        catch (CORBA::SystemException &ex4)
        {
                _RPT0(_CRT_ERROR, "xxx");
        }
        catch (CORBA::COMM_FAILURE &ex5)
        {
                _RPT0(_CRT_ERROR, "xxx");
        }

        catch (...)
        {
                _RPT0(_CRT_ERROR, "xxx");
        }
        return S_OK;
}


FK::Comkit::Service_Base_ptr FK::Comkit::_objref_Service_Gate::login(const 
char* user, const char* password)
{
  _0RL_cd_6C993FE03516BAC7_01000000 
_call_desc(_0RL_lcfn_6C993FE03516BAC7_11000000, "login", 6);
  _call_desc.arg_0 = user;
  _call_desc.arg_1 = password;

  _invoke(_call_desc);
  return _call_desc.result._retn();

}


the exception is generated inside the _invoke() function ..... Thanks 
again
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20050314/785b508c/attachment.htm


More information about the omniORB-list mailing list