[Mondrian] Discarding exceptions

Julian Hyde julianhyde at speakeasy.net
Wed Aug 1 02:00:00 EDT 2007


Thiyagu,
 
I just bumped into a catch block you wrote in SegmentLoader.load:
 
        } catch (SQLException e) {
            throw stmt.handle(e);
        } catch (Exception e) {
            e.printStackTrace();

It was throwing away a genuine exception (albeit after it had printed the
stack trace to a logfile). We were generating an invalid statement for
Oracle, but by the time it reached that catch block it had been wrapped in a
RuntimeException, so it hit the 'Exception' block rather than the
'SQLException' block.
 
Any particular reason you chose to throw away the exception? Our error
handling policy is to re-throw everything that can possibly indicate an
error, so that the top-level statement will fail.
 
Can you do a review and make sure you haven't put similar error-handling
code elsewhere?
 
Julian
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20070731/ea9051bc/attachment.html 


More information about the Mondrian mailing list