[Mulgara-dev] [Mulgara-svn] r1779 - trunk/src/jar/resolver-lucene/java/org/mulgara/resolver/lucene

Paul Gearon gearon at ieee.org
Thu Aug 20 11:22:09 UTC 2009


On Thu, Aug 20, 2009 at 1:00 AM, Life is hard, and then you
die<ronald at innovation.ch> wrote:
> On Wed, Aug 19, 2009 at 10:09:55PM -0700, pag at mulgara.org wrote:
>> -            throw new ResolverException("Unable to modify full text index", e);
>> +            throw new ResolverException("Unable to modify full text index:" + e);
> [snip]
>
> Sorry, but I have to very strongly disagree with this. You've now just
> thrown away the stack-trace from the inner exception, which is a major
> no-no. Please back this whole change out. There are few things worse
> than getting an exception but not being able see where it came from
> (I can't count how often I've sworn at stupid developers that have
> thrown away stack traces and have therefore turned a quick 2 minute
> debugging issue into a multi-hour ordeal). Stack-traces are one of the
> single-most useful things in Java.

You're right on this. I did this in a hurry, and I hadn't used
Throwable.toString() for so long that I forgot it just gets the
message, and ignores the stack trace.

> Pradeep already pointed out how to really fix this for RMI, so I don't
> understand why you would choose to cripple things instead.

I'm not comfortable opening up the serialization of arbitrary
exceptions over RMI. Instead, I intend to send the description of the
stack trace over RMI. I admit that having the original exception chain
does make handling of the exception more flexible, but all we do is
just print the stack trace anyway, so I don't see that we'll be losing
anything in reality.

Anyway, I'll go fix the stack trace now.

Paul



More information about the Mulgara-dev mailing list