[omniORB] Any type

Duncan Grisby duncan@grisby.org
Wed Jun 26 23:42:00 2002


On Wednesday 26 June, Alexander Deruwe wrote:

> struct data_s
>     {
>     long id;
>     string name;
>     };
> typedef sequence<data_s> data;
> any load (in long id); // supposed to return a data type

Why do you think this is better than declaring load() to return
data_s?  Using Any is always more work.

> What is the value that omniORB expects to be returned in case no valid
> data is found? Do I create a special "error struct" (which I could then
> load with diagnostic messages), or do I load a 'data' structure with
> bogus values? Or something else?

It is best to declare a user exception and raise that.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan@grisby.org     --
   -- http://www.grisby.org --