Hi Geert,

On 15/12/11 06:45, Geert Josten wrote:
> Just wondering. MarkLogic 5 has transaction management functions. Would
> things be different if one would use those? E.g. set the mode to update
> and do a commit after the insert? Would that make such exceptions
> catchable from within the xquery code?

Using explicit transaction commit wouldn't change the fact that the 
exception is uncatchable. There are a couple of reasons for this:

1) The commit still happens after execution of the statement - calling 
xdmp:commit() just queues the commit to happen.

2) The database is in an inconsistent state until the transaction 
workload has finished executing. MarkLogic only has one way to rectify 
the inconsistent state, which is to roll back the transaction - so you 
can't effectively recover from that kind of exception.

John

-- 
John Snelson, Senior Engineer                  http://twitter.com/jpcs
MarkLogic Corporation                         http://www.marklogic.com
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to