ORBit2 and checking CORBA_Environent's



Hi guys,

as you all probably know you must check the CORBA_Environment on
every CORBA call, especially if it has a return value.

However, with ORBit 0.5.x you could assume that a CORBA method
will return NULL on an exception, for instance the following
was "allowed" and it always returned CORBA_OBJECT_NIL if there
was an exception:

====
Bonobo_Unknown hello (void)
{
    CORBA_Environment ev;

    CORBA_exception_init (&ev);
    foo = bonobo_get_object ("something", "Bonobo/Unknown", &ev)
    CORBA_exception_free (&ev);

    return foo;
}
=====

With ORBit2 this doesn't work anymore - you get "something" as return
value (an invalid pointer).

Even if this is allowed according to the CORBA spec, shouldn't we change
this to the GNOME 1.x behaviour - returning an invalid pointer which
points to some random location in memory will just cause semi-random and
hard to find crashes.

-- 
Martin Baulig
martin gnome org (private)
baulig suse de (work)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]