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 @@ ...@@ -66,12 +66,15 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from Products.ERP5.Document.Document import ConversionError\n <value> <string>from Products.ERP5.Document.Document import ConversionError\n
from ZODB.POSException import ConflictError\n
from xmlrpclib import Fault\n from xmlrpclib import Fault\n
from socket import error as SocketError\n from socket import error as SocketError\n
\n \n
message = None\n message = None\n
try:\n try:\n
return context.convertToBaseFormat()\n return context.convertToBaseFormat()\n
except ConflictError:\n
raise\n
except ConversionError, e:\n except ConversionError, e:\n
message = \'Conversion Error: %s\' % (str(e) or \'undefined.\')\n message = \'Conversion Error: %s\' % (str(e) or \'undefined.\')\n
except Fault, e:\n except Fault, e:\n
...@@ -132,6 +135,8 @@ return message\n ...@@ -132,6 +135,8 @@ return message\n
<tuple> <tuple>
<string>Products.ERP5.Document.Document</string> <string>Products.ERP5.Document.Document</string>
<string>ConversionError</string> <string>ConversionError</string>
<string>ZODB.POSException</string>
<string>ConflictError</string>
<string>xmlrpclib</string> <string>xmlrpclib</string>
<string>Fault</string> <string>Fault</string>
<string>socket</string> <string>socket</string>
...@@ -163,6 +168,12 @@ return message\n ...@@ -163,6 +168,12 @@ return message\n
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>Document_tryToConvertToBaseFormat</string> </value> <value> <string>Document_tryToConvertToBaseFormat</string> </value>
</item> </item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
<value> <value>
......
...@@ -65,11 +65,14 @@ ...@@ -65,11 +65,14 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <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 \n
message = None\n message = None\n
try:\n try:\n
return context.updateBaseMetadata(**kw)\n return context.updateBaseMetadata(**kw)\n
except ConflictError:\n
raise\n
except ConversionError, e:\n except ConversionError, e:\n
message = \'Conversion Error: %s\' % (str(e) or \'undefined.\')\n message = \'Conversion Error: %s\' % (str(e) or \'undefined.\')\n
except Exception, e:\n except Exception, e:\n
...@@ -125,6 +128,8 @@ return message\n ...@@ -125,6 +128,8 @@ return message\n
<value> <value>
<tuple> <tuple>
<string>kw</string> <string>kw</string>
<string>ZODB.POSException</string>
<string>ConflictError</string>
<string>Products.ERP5.Document.Document</string> <string>Products.ERP5.Document.Document</string>
<string>ConversionError</string> <string>ConversionError</string>
<string>None</string> <string>None</string>
...@@ -154,6 +159,12 @@ return message\n ...@@ -154,6 +159,12 @@ return message\n
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>Document_tryToUpdateBaseMetadata</string> </value> <value> <string>Document_tryToUpdateBaseMetadata</string> </value>
</item> </item>
<item>
<key> <string>uid</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
<value> <value>
......
907 909
\ No newline at end of file \ 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