users
[Top] [All Lists]

printStackTrace prints nothing

To: users@xxxxxxxxxx
Subject: printStackTrace prints nothing
From: lei.han@xxxxxxxxxxxxx
Date: Fri, 18 Aug 2006 10:53:14 -0400
Delivered-to: mailing list users@cinjug.org
Mailing-list: contact users-help@cinjug.org; run by ezmlm





My code has logic like

java.io.StringWriter writer = new java.io.StringWriter();
e.printStackTrace(new java.io.PrintWriter(writer));
String stackTraceString = writer.toString();

buf.append(stackTraceString);

LOG.error(buf);

But in my log file I only see

java.lang.NullPointerException

There is no stack trace after it and also no print out like <<no stack
trace available>>

How come the stack trace of java.lang.NullPointerException has not been
printed out?

Thanks!

Lei Han || Home : (248) 6149056 Cell: (513)6074271
--
"NOTICE:  The information contained in this electronic mail transmission is
intended by Convergys Corporation for the use of the named individual or
entity to which it is directed and may contain information that is
privileged or otherwise confidential.  If you have received this electronic
mail transmission in error, please delete it from your system without
copying or forwarding it, and notify the sender of the error by reply email
or by telephone (collect), so that the sender's address records can be
corrected."


<Prev in Thread] Current Thread [Next in Thread>