Wednesday, April 14, 2010

Exceptions and tts 2

Once I wrote here that one cannot catch exception from inside transaction. This appeared to be not true. Or, well, at least partially true. There are types of exceptions that can be caught from inside transaction - Exception::DuplicateKeyException and Exception::UpdateConflict.
Example:
ttsbegin;
try
{
    throw Exception::UpdateConflict;
}
catch
{
    info("Here");
}
ttscommit;

6 comments: