I don't know if this is any consolation:
http://lists.merlins.org/archives/ex...ly/001878.html
I'm not too sure what this does because I'm not a TCL programmer, but I have a feeling that it will retry the script. The code may have to be adapted slightly though.Code:# # I do not use the regular RetryTransaction because I do not like the fact # it adds a puts in the middle if a transaction fails proc MyRetryTransaction { body } { global errorInfo errorCode while { 1 } { set code [catch {transaction {uplevel $body}} string] if { $code == 0 } { return $string } elseif { $code == 1 } { if { $errorCode == "errTmActiveLockConflict" || $errorCode == "errTmBackgroundHoldoff" || $errorCode == "errFsLockConflict" } { after 100 # retry the transaction continue } return -code error -errorinfo $errorInfo -errorcode $errorCode $string } elseif { $code == 2 } { return -code return $string } elseif { $code == 3 } { return -code break $string } elseif { $code == 4 } { return -code continue $string } } }
Cheers
Bookmarks