Reputation: 11
I have two grain method marked as TransactionOption.CreateOrJoin, which is invoked by another grain method marked as TransactionOption.Create. I want to abort all process if any of two grain method marked as TransactionOption.CreateOrJoin failed. Should I throw an exception like this? Or is there any solution to abort all process?
await _balance.PerformUpdate(q =>{
if (q.Amount + amount > _balanceLimit)
{
throw new ApplicationException("limit exceeded");
}
q.Amount += amount;
});
Upvotes: 1
Views: 105