Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

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

  1. #1
    Guest

    Default [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.
    --------------------------------------------------------------------------

  2. #2
    Julian Hyde Guest

    Default RE: [Mondrian] Ignored exception in mondrian.rolap.SqlTupleReaderclass

    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...180&group_id=3
    5302&atid=414613>
    http://sourceforge.net/tracker/index...80&group_id=35
    302&atid=414613

    Julian


    _____

    From: mondrian-bounces (AT) pentaho (DOT) org [mailto:mondrian-bounces (AT) pentaho (DOT) org] On
    Behalf Of rolf.lear (AT) algorithmics (DOT) com
    Sent: Wednesday, March 11, 2009 4:20 PM
    To: mondrian (AT) pentaho (DOT) 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.
    _____

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.