[omniORB] _var Mapping Question

Ken Feuerman kfeuerma@Adobe.COM
Wed, 22 Sep 1999 14:31:31 -0700


I'd like to do something like the following:

T_var myvar;  // empty initialization

try
{
    myvar = // Something that will likely throw
}
catch (...)
{
    // oh well, didn't really need myvar anyhow
}

if (myvar != "NULL")   // (**)
{
    // do something with a non-"NULL" myvar
}


Basically, in the line marked by (**), I need to check if the T_var
variable was ever assigned to successfully within the try{} block.  Is
there some ORB-portable way to check if a T_var is still "empty initialized"?

By the way, I tried (!CORBA::is_nil(myvar)) for (**) above, and that did
not seem to work.

Thanks!

--Ken Feuerman.