[saga-rg] exceptions...

Pascal Kleijer k-pasukaru at ap.jp.nec.com
Sun Feb 19 18:09:01 CST 2006


Hello all,

Just to support Andre and Hartmut!

>   - if an exception is fatal or not depends on the use case
>     ("Can't suspend job" - fatal or not?)

Exact. The API can in most cases not decide what it is. I have cases 
where I consider a same exception as an internal signal and in order 
cases I throw it upwards to the application. Unless you can clearly 
identify "fatal" and eventually handle it, you should expose the problem 
to the application.



>   - a non-fatal backend exception could be recovered from by
>     the saga implementation, and would hence not reach the
>     application - so we don't need it.  If we can't recover,
>     it might well be fatal.

Yes, if the API can do nothing or don't know how to handle it, throw it 
upward. Their might be cases where the SAGA implementation differs. For 
example, if one implementation has disconnection recovery implemented 
and another not, one might mute and recover from the exception when the 
other will throw it.



>   - obviously bad things like 'not enough memory' don't need
>     to be put into saga exceptions - have nothing to do with
>     saga semantics.

Right, not in the API scope. In Java they are not even Exceptions but 
Errors (Fatal) and they are unchecked. You can trap them and eventually 
handle them, but in most cases it is hard to recover from them.



> So, I/we _think_ the agreement was to have only one simple
> saga::exception class which gets thrown whenever something
> happens which violates the semantic contract of a saga call.

The different implementation can always sub-class them to provide better 
exception semantic. A single saga::exception class is more then enough.

Anyway you have my support on this.

-- 

Best regards,
Pascal Kleijer

----------------------------------------------------------------
   HPC Marketing Promotion Division, NEC Corporation
   1-10, Nisshin-cho, Fuchu, Tokyo, 183-8501, Japan.
   Tel: +81-(0)42/333.6389       Fax: +81-(0)42/333.6382
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4385 bytes
Desc: S/MIME Cryptographic Signature
Url : http://www.ogf.org/pipermail/saga-rg/attachments/20060220/6f01bc75/attachment-0003.bin 


More information about the saga-rg mailing list