svn commit: r1334576 - /ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1334576 - /ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java

jleroux@apache.org
Author: jleroux
Date: Sun May  6 09:06:39 2012
New Revision: 1334576

URL: http://svn.apache.org/viewvc?rev=1334576&view=rev
Log:
Non functional changes. Removes useless exceptions catches.

Modified:
    ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java?rev=1334576&r1=1334575&r2=1334576&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java Sun May  6 09:06:39 2012
@@ -53,7 +53,6 @@ import javax.xml.transform.stream.Stream
 import javolution.util.FastList;
 import javolution.util.FastMap;
 
-import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.Fop;
 import org.apache.fop.apps.MimeConstants;
 import org.ofbiz.base.util.Debug;
@@ -529,22 +528,12 @@ public class EmailServices {
                     baos.close();
 
                     // store in the list of maps for sendmail....
-                    bodyParts.add(UtilMisc.<String, Object>toMap("content", baos.toByteArray(), "type", "application/pdf", "filename", attachmentName));
-                } catch (GeneralException ge) {
-                    Debug.logError(ge, "Error rendering PDF attachment for email: " + ge.toString(), module);
-                    return ServiceUtil.returnError(UtilProperties.getMessage(resource, "CommonEmailSendRenderingScreenPdfError", UtilMisc.toMap("errorString", ge.toString()), locale));
-                } catch (IOException ie) {
-                    Debug.logError(ie, "Error rendering PDF attachment for email: " + ie.toString(), module);
-                    return ServiceUtil.returnError(UtilProperties.getMessage(resource, "CommonEmailSendRenderingScreenPdfError", UtilMisc.toMap("errorString", ie.toString()), locale));
-                } catch (FOPException fe) {
-                    Debug.logError(fe, "Error rendering PDF attachment for email: " + fe.toString(), module);
-                    return ServiceUtil.returnError(UtilProperties.getMessage(resource, "CommonEmailSendRenderingScreenPdfError", UtilMisc.toMap("errorString", fe.toString()), locale));
-                } catch (SAXException se) {
-                    Debug.logError(se, "Error rendering PDF attachment for email: " + se.toString(), module);
-                    return ServiceUtil.returnError(UtilProperties.getMessage(resource, "CommonEmailSendRenderingScreenPdfError", UtilMisc.toMap("errorString", se.toString()), locale));
-                } catch (ParserConfigurationException pe) {
-                    Debug.logError(pe, "Error rendering PDF attachment for email: " + pe.toString(), module);
-                    return ServiceUtil.returnError(UtilProperties.getMessage(resource, "CommonEmailSendRenderingScreenPdfError", UtilMisc.toMap("errorString", pe.toString()), locale));
+                    bodyParts.add(UtilMisc.<String, Object> toMap("content", baos.toByteArray(), "type", "application/pdf", "filename",
+                            attachmentName));
+                } catch (Exception e) {
+                    Debug.logError(e, "Error rendering PDF attachment for email: " + e.toString(), module);
+                    return ServiceUtil.returnError(UtilProperties.getMessage(resource, "CommonEmailSendRenderingScreenPdfError",
+                            UtilMisc.toMap("errorString", e.toString()), locale));
                 }
                 
                 serviceContext.put("bodyParts", bodyParts);