openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "robert burrell donkin" <robertburrelldon...@gmail.com>
Subject Re: Why do we capture the call stack when close() is called?
Date Sat, 10 Feb 2007 14:58:03 GMT
On 2/9/07, Craig L Russell <Craig.Russell@sun.com> wrote:
>
> On Feb 8, 2007, at 3:32 PM, Patrick Linskey wrote:
>
> > It's there for debugging purposes. We could probably check for
> > TRACE-level logging; if not enabled, the exception would not be
> > created
> > and the assertion would include a localized string instructing the
> > user
> > to turn on TRACE logging to get the closure point.
>
> I like this. If you get an exception because your code accidentally
> called close(), it's really nice to be able to track it down instead
> of inserting a hundred printf's. But we should strive to avoid
> generating unnecessary stack traces because of the performance.
>
> +1 to check the log level and only capture and throw the call stack
> on close if the user is running TRACE.

+1

- robert

Mime
View raw message