[Mondrian] Ignored exception in mondrian.rolap.SqlTupleReader class

Julian Hyde jhyde at pentaho.com
Thu Mar 12 14:54:08 EDT 2009


Agreed. The results of the handle function should always be thrown. There
are a couple of other places where it is ignored. I saw you logged a bug for
this. I will fix today.
 
 
<http://sourceforge.net/tracker/index.php?func=detail&aid=2684180&group_id=3
5302&atid=414613>
http://sourceforge.net/tracker/index.php?func=detail&aid=2684180&group_id=35
302&atid=414613
 
Julian


  _____  

From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On
Behalf Of rolf.lear at algorithmics.com
Sent: Wednesday, March 11, 2009 4:20 PM
To: mondrian at pentaho.org
Subject: [Mondrian] Ignored exception in mondrian.rolap.SqlTupleReader class



Hi all.



In prepareTuples(...) there is a try/catch block which catches
(SQLException).... It looks like:



        try {



            .........

           

        } catch (SQLException e) {

            if (stmt == null) {

                throw Util.newError(e, message);

            } else {

                stmt.handle(e);

            }

        } finally {

            if (stmt != null) {

                stmt.close();

            }

        }



This catch-block fails to re-throw the exception processed by the
stmt.handle() method. As a result, errors occurring during the execution of
this thread are unreported. No error is raised to calling code and undefined
activity subsequently happens.



This issue was identified in the 3.04 code base, but the same error exists
in the current 3.1 repository.



The code should read:



        try {



            .........

           

        } catch (SQLException e) {

            if (stmt == null) {

                throw Util.newError(e, message);

            } else {

                throw stmt.handle(e);

            }

        } finally {

            if (stmt != null) {

                stmt.close();

            }

        }





Rolf

 
  _____  

This email and any files transmitted with it are confidential and
proprietary to Algorithmics Incorporated and its affiliates
("Algorithmics"). If received in error, use is prohibited. Please destroy,
and notify sender. Sender does not waive confidentiality or privilege.
Internet communications cannot be guaranteed to be timely, secure, error or
virus-free. Algorithmics does not accept liability for any errors or
omissions. Any commitment intended to bind Algorithmics must be reduced to
writing and signed by an authorized signatory.
  _____  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20090312/1e7cc3f6/attachment.html 


More information about the Mondrian mailing list