[omniORB] Any type

Alexander Deruwe aderuwe@aqs-carcontrol.be
Wed Jun 26 10:05:02 2002


Hewwo everybody,

I've converted my IDL to use the any type a few days ago, and am in the
process of modifying my existing code now (which becomes alot simpler
:).

I have a question though:

### SAMPLE IDL

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

### END SAMPLE

Suppose this function 'load' does not find a record; I would somehow
have to show this to the client. If I do this by returning None, my
client crashes.
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?

Thanks for the help,

-- 
Alexander Deruwe
AQS-CarControl