Boost logo

Boost :

Subject: Re: [boost] [transact] transaction language macros (was: Re: [transact] code in sandbox)
From: strasser_at_[hidden]
Date: 2010-02-21 17:21:47

the changes we've discussed:

Zitat von "vicente.botet" <vicente.botet_at_[hidden]>:

> Yes, we can. But the result of the break is that we don't retry,
> i.e. we abort the transaction. If you prefer you can throw an
> isolation_exception when the user uses break or continue instead of
> asserting it don't use it.

I'm pretty sure you're trying to stop the user from shooting himself
in the foot here.
instead of "break", the user could also "return" from a retry clause.
or throw an exception and absorbing it outside of the transactino
scope, with similar results.
I think "break" should break, not assert and not throw, just because
we think this is what the user should have done.

>> try{
>> //...
>> }catch(my_exc &){
>> transaction{
>> //...
>> }retry{
>> throw;
>> }
>> }
>> is it expected behaviour that this rethrows isolation_exception, not my_exc?
> yes, IMO the exception must be isolation_exception, or a specific
> exception the library documents and make the outer transaction to
> abort.

OK. moved the user's retry code back into the catch-clause.



Boost list run by bdawes at, gregod at, cpdaniel at, john at