Re: possible bug in ORBit2



On Fri, 2002-01-11 at 13:17, Sebastian Wilhelmi wrote:
> Hi Diego,
> 
> > what i'm trying to say is that the NameServer is returning
> > CORBA_OBJECT_NIL, but on the client side i'm not getting this, when i do
> > 
> > object = CORBA_OBJECT_NIL;
> > object = CosNaming_NamingContext_resolve (...);
> > 
> > if (ev._major != CORBA_NO_EXCEPTION) {
> > 	if (object == CORBA_OBJECT_NIL)
> > 		g_print ("object == NIL\n");
> > 	else
> > 		g_print ("object != NIL\n");
> > } 
> > 
> > 	my program prints "object != NIL" when an exception is thrown, as i
> > understand it it should be printing "object == NIL". 
> 
> Yes, because a exception means: Some sort of error occured and this
> functions threw an exception. It didn't return. The return value of
> CosNaming_NamingContext_resolve is not even transmitted over the wire
> back to the clienr. How should the client know it? Did you ever look at
> any exception system? It _never_ returns anything, when an exception is
> thrown. Indeed this is the whole idea of exceptions. To have a system to
> override normal returns.

ok, now i understand it, i have never dealt with any exception system 
before. Thanks.

> 
> That the mapping into C does not carry over that idea very good (and
> cannot do it) is another point.
> 
> Bye,
> Sebastian
> -- 
> Sebastian Wilhelmi
> mailto:wilhelmi@ira.uka.de
> http://goethe.ira.uka.de/~wilhelmi
> 
> 
> _______________________________________________
> orbit-list mailing list
> orbit-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/orbit-list





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