Commit c6ff9f01 authored by Jérome Perrin's avatar Jérome Perrin

reraise ConflictErrors

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22628 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8b6d1782
......@@ -66,12 +66,15 @@
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.ERP5.Document.Document import ConversionError\n
from ZODB.POSException import ConflictError\n
from xmlrpclib import Fault\n
from socket import error as SocketError\n
\n
message = None\n
try:\n
return context.convertToBaseFormat()\n
except ConflictError:\n
raise\n
except ConversionError, e:\n
message = \'Conversion Error: %s\' % (str(e) or \'undefined.\')\n
except Fault, e:\n
......@@ -132,6 +135,8 @@ return message\n
<tuple>
<string>Products.ERP5.Document.Document</string>
<string>ConversionError</string>
<string>ZODB.POSException</string>
<string>ConflictError</string>
<string>xmlrpclib</string>
<string>Fault</string>
<string>socket</string>
......@@ -163,6 +168,12 @@ return message\n
<key> <string>id</string> </key>
<value> <string>Document_tryToConvertToBaseFormat</string> </value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
......
......@@ -65,11 +65,14 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.ERP5.Document.Document import ConversionError\n
<value> <string>from ZODB.POSException import ConflictError\n
from Products.ERP5.Document.Document import ConversionError\n
\n
message = None\n
try:\n
return context.updateBaseMetadata(**kw)\n
except ConflictError:\n
raise\n
except ConversionError, e:\n
message = \'Conversion Error: %s\' % (str(e) or \'undefined.\')\n
except Exception, e:\n
......@@ -125,6 +128,8 @@ return message\n
<value>
<tuple>
<string>kw</string>
<string>ZODB.POSException</string>
<string>ConflictError</string>
<string>Products.ERP5.Document.Document</string>
<string>ConversionError</string>
<string>None</string>
......@@ -154,6 +159,12 @@ return message\n
<key> <string>id</string> </key>
<value> <string>Document_tryToUpdateBaseMetadata</string> </value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
......
907
\ No newline at end of file
909
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment