Changed the exception handling to get useful messages
authorIván Perdomo <ivan.perdomo@openbravo.com>
Thu, 18 Jun 2009 18:39:52 +0200
changeset 4037 a8543f046eed
parent 4036 40b4ded6254d
child 4038 da2e7a5269c6
Changed the exception handling to get useful messages
src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
--- a/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java	Thu Jun 18 18:17:46 2009 +0200
+++ b/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java	Thu Jun 18 18:39:52 2009 +0200
@@ -1004,7 +1004,7 @@
           jasperPrint = JasperFillManager.fillReport(jasperReport, designParameters, con);
         }
       } catch (final Exception e) {
-        throw new ServletException(e.getCause().getMessage());
+        throw new ServletException(e.getMessage(), e);
       } finally {
         releaseRollbackConnection(con);
       }
@@ -1041,7 +1041,7 @@
       }
     } catch (final JRException e) {
       log4j.error("JR: Error: ", e);
-      throw new ServletException(e.getMessage());
+      throw new ServletException(e.getMessage(), e);
     } catch (IOException ioe) {
       try {
         FileUtility f = new FileUtility(globalParameters.strFTPDirectory, strFileName + "-"