Commit dc46c0f9 authored by Fabien Morin's avatar Fabien Morin

add Exception type to raise and error message


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20224 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6955c4e8
...@@ -609,7 +609,8 @@ class ManageFiles: ...@@ -609,7 +609,8 @@ class ManageFiles:
LOG('ScribusUtils.setBackgroundPictures :', ERROR, 'convert command'\ LOG('ScribusUtils.setBackgroundPictures :', ERROR, 'convert command'\
'failed with the following error message : \n%s' % result[1]) 'failed with the following error message : \n%s' % result[1])
temp_image.close() temp_image.close()
raise raise ValueError, 'Error: convert command failed with the following'\
'error message : \n%s' % result[1]
finally: finally:
temp_pdf.close() temp_pdf.close()
...@@ -631,7 +632,8 @@ class ManageFiles: ...@@ -631,7 +632,8 @@ class ManageFiles:
LOG('ScribusUtils.setBackgroundPictures :', ERROR, 'no background '\ LOG('ScribusUtils.setBackgroundPictures :', ERROR, 'no background '\
'image found') 'image found')
temp_image.close() temp_image.close()
raise raise ValueError, 'Error: ScribusUtils.setBackgroundPictures : '\
'no background'
# get the real size of the first image # get the real size of the first image
# this could be usefull if the user only defined one dimention # this could be usefull if the user only defined one dimention
......
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