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

rolf.lear at algorithmics.com rolf.lear at algorithmics.com
Wed Mar 11 19:20:13 EDT 2009


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/20090311/f3868c63/attachment.html 


More information about the Mondrian mailing list