J
Jan Burse
Lew said:There's a difference between "no information" and "information that
there is no information". The latter tells you something, at least.
My original question was: How can I force an exception to not
record some stack frame list at all.
One proposed solution so far was pre-allocating exceptions
from a call site with a few stack frames. Eventually also
calling the following method on the pre-allocated exception:
setStackTrace(new StackTraceElement[0]);
So as to even free the stack trace that was allocate from the
call site with only a few stack frames. The above method is
available since JDK 1.4.
What about calling setStackTrace() just after the new and before
the throw. This would only give a space advantage but not a
time advantage.
Any other suggestions?
Bye