[Mondrian] catching Error and ignoring
Julian Hyde
julianhyde at speakeasy.net
Mon Apr 23 17:17:18 EDT 2007
I agree. I would re-throw any Errors. Leave the Util.discard - it is a
good practice if you are going to throw away an exception.
Hence:
} catch (ResultLimitExceededException e) {
// Do NOT ignore a ResultLimitExceededException!!!
throw e;
} catch (MondrianEvaluationException e) {
// ignore
} catch (Error e) {
// Errors indicate fatal JVM problems; do not
discard
throw e;
} catch (Throwable e) {
// Discard non-fatal exceptions.
Util.discard(e);
}
Julian
> -----Original Message-----
> From: mondrian-bounces at pentaho.org
> [mailto:mondrian-bounces at pentaho.org] On Behalf Of Richard Emberson
> Sent: Monday, April 23, 2007 12:03 PM
> To: mondrian at pentaho.org
> Subject: [Mondrian] catching Error and ignoring
>
>
> Just looking through the code and noticed that
> RolapResult (about line 922) has the following:
>
> } catch (ResultLimitExceededException e) {
> // Do NOT ignore a
> ResultLimitExceededException!!!
> throw e;
>
> } catch (MondrianEvaluationException e) {
> // ignore
>
> } catch (Throwable e) {
> Util.discard(e);
> }
>
>
> Catches a Throwable and ignores it. Now Errors are JVM
> fatal conditions. Should we be ignoring Errors?
>
> Richard
>
>
> --
> Quis custodiet ipsos custodes:
> This email message is for the sole use of the intended
> recipient(s) and
> may contain confidential information. Any unauthorized review, use,
> disclosure or distribution is prohibited. If you are not the intended
> recipient, please contact the sender by reply email and destroy all
> copies of the original message.
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
>
More information about the Mondrian
mailing list