[omniORB] Questions about self defined exception raising

Luo Yongheng langsir at yeah.net
Tue Mar 18 17:28:14 GMT 2008


> Luo Yongheng wrote:
>> I understand that, but that is the problem. I don't want to raise 
>> exceptions to clients. I just want to raise some exceptions that are 
>> supposed to be captured by server side, like some logical errors in the 
>> servant. These kind of errors are not supposed to be handled by the 
>> clients.
>>
>
> Oh.
> Then you would have to catch these exceptions in the Methods of the 
> servants - after all, only there you can know how to handle them, right?
>
> When you say "captured by the server side", what is it you wish to do once 
> the exceptions have been caught? (Logging? Abort Process? Do nothing?) 
> What would you return to the client upon such an exception?
>
> cheers,
> Martin
>

Main thread that starts the ORB and servants sometimes wants to capture some 
exceptions raised by servants code. Theoritically it seems impossible, 
because the main thread usually is not the same thread as the servant 
thread.

That means, just like you mentioned, on server side we can only capture the 
exception in the servant itself. This is sometimes a little inflexible for 
writing server applications.

Thanks.
Thierry 





More information about the omniORB-list mailing list