Changed the message shown when xml file parsing fails during draft submission to include the actual error message from the xml parser. Fixes issue #2353.

- Legacy-Id: 14102
This commit is contained in:
Henrik Levkowetz 2017-09-06 17:41:29 +00:00
parent dda271bd7e
commit a9b259ef26

View file

@ -151,7 +151,7 @@ class SubmissionUploadForm(forms.Form):
self.xmltree = parser.parse()
ok, errors = self.xmltree.validate()
except Exception as exc:
raise forms.ValidationError("An exception occurred when trying to process the XML file: %s" % exc)
raise forms.ValidationError("An exception occurred when trying to process the XML file: %s" % exc.msg)
if not ok:
# Each error has properties:
#