From dc46c0f9179038d9f74c3e64de686142e001799b Mon Sep 17 00:00:00 2001
From: Fabien Morin <fabien@nexedi.com>
Date: Mon, 31 Mar 2008 12:20:00 +0000
Subject: [PATCH] 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
---
 product/ERP5Form/ScribusUtils.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/product/ERP5Form/ScribusUtils.py b/product/ERP5Form/ScribusUtils.py
index 6493c7f5f3..91e5210f8c 100644
--- a/product/ERP5Form/ScribusUtils.py
+++ b/product/ERP5Form/ScribusUtils.py
@@ -609,7 +609,8 @@ class ManageFiles:
         LOG('ScribusUtils.setBackgroundPictures :', ERROR, 'convert command'\
             'failed with the following error message : \n%s' % result[1])
         temp_image.close()
-        raise
+        raise ValueError, 'Error: convert command failed with the following'\
+                          'error message : \n%s' % result[1]
     finally:
       temp_pdf.close()
     
@@ -631,7 +632,8 @@ class ManageFiles:
       LOG('ScribusUtils.setBackgroundPictures :', ERROR, 'no background '\
           'image found')
       temp_image.close()
-      raise
+      raise ValueError, 'Error: ScribusUtils.setBackgroundPictures : '\
+                        'no background'
 
     # get the real size of the first image
     # this could be usefull if the user only defined one dimention
-- 
2.30.9