[Ur] Exceptions handling

Vladimir Shabanov vshabanoff at gmail.com
Mon Sep 6 08:46:47 EDT 2010


2010/9/6 Adam Chlipala <adamc at impredicative.com>:
> Vladimir Shabanov wrote:
>>
>> Do you mean that things like "set my_source new_value" will also roll
>> back on transaction error?
>>
>
> In server-side code, yes.  Client-side code isn't really transactional,
> despite the misleading use of the [transaction] monad.  On the server side,
> examples of FFI state to roll back include e-mails queued to be sent and
> manual filesystem changes.

Nice thing. I didn't thought that anything except DB transaction is
cancelled on error. This should be documented somewhere (maybe in
demo).

BTW for external tasks I use database not FFI -- Ur application just
writes task to some table and external application(s) poll DB for new
tasks. Maybe not so direct, but I get logging/task separation/fault
tolerance and rollbacks this way.



More information about the Ur mailing list