> From: Leo Sutic [mailto:[EMAIL PROTECTED]
> > From: news [mailto:[EMAIL PROTECTED] On Behalf Of Berin Loritsch
> >
> > > For example, Hejlsberg lists as one bad thing about rethrowing
> > > exceptions that you loose the stack trace. But if the
> Exception is
> > > supposed to be handled, then who cares about the stack trace?
> >
> > If you rethrow the exact same exception, shouldn't the stack
> > trace remain in tact? If you throw a wrapped exception, then
> > you can still get to the original stack trace. The stack
> > trace is important to developers because it helps pinpoint
> > the exact place where the problem occurred.
>
> Hejlsberg meant the case where an Exception is re-thrown and
> not wrapped.
And by that I mean re-thrown-as-another-Exception:
try {
....
} catch (SomeException se) {
throw new SomeOtherException ();
}
/LS