dev@glassfish.java.net

Re: CORRECT SNIPPIT HERE: A 'should not reach here' exception

From: Craig L Russell <Craig.Russell_at_Sun.COM>
Date: Sat, 05 Aug 2006 19:02:29 -0700

Hi Jan,

I agree. I also use "should not reach here" except I usually use the
slightly more descriptive "internal error; please file a bug".

I treat this as an alternative to trying to figure out during
development an exhaustive list of possible causes for the exception
that I just caught. I don't know enough to know what the root cause
is, so I punt.

This is often the case when developing modules with dependencies on
other modules (like security where sometimes identifying the error is
a security risk ;-) where the interfaces aren't 100% clear on when
and why an exception is thrown.

The response in case someone actually gets this message as a user is
"Thanks for finding this; please provide more information and a patch
will be forthcoming".

Craig

On Jul 31, 2006, at 2:38 PM, Jan Luehe wrote:

>
>
> Jerome Dochez wrote On 07/31/06 13:39,:
>
>> I agree, even if I understand the runtime error may need to be a
>> bit more generic, we should have better message than "should not
>> reach here".
>
>
> The fix I just committed implements the "spirit" of this message,
> in that it won't even let you reach the point where DIGEST
> authentication, which is not supported, is attempted.
>
> I agree "Should not reach here" could be turned into something more
> descriptive. But I also kind of like this message, because it gives a
> hint to the container developers that a code path is being executed
> that should have never been reached. In other words, it puts the
> burden of investigation on us (as it did in this case, and very
> successfully so :-), rather than on the webapp developer.
>
> I'll defer to the security team, whose code is throwing this
> IllegalStateException, as to whether they want to change the
> exception message. But as I mentioned, this message was
> never supposed to see the light of a stacktrace, and has helped
> me pinpoint its rootcause.
>
>
> Jan
>
>
>>
>> Jerome
>>
>> Marina Vatkina wrote:
>>
>>> Jan, Shing Wai,
>>>
>>> I think both cases need to be fixed - if deployment
>>> doesn't fail (it should), the error message should
>>> give all the necessary information to the user.
>>>
>>> My $.02.
>>> -marina
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell_at_sun.com
P.S. A good JDO? O, Gasp!