i want to convert store stackTrace into a string is it possible if yes please let me kn like String s = e.printStackTrace(PrintStream pout); i kn the printStackTrace returns void but still i want to store the exception into a String..... Please help me...
Rao<BR>Sun Certified Programmer for the Java��� 2 Platform
posted 12 years ago
Hi Rao, Following Code will do the needful StringWriter exception1=new StringWriter(); e.printStackTrace(new PrintWriter(exception1)); String exceptionInString = exception1.toString(); -Harneet Sachdeva
Harneet -- Welcome to JavaRanch! We don't have too many rules around here, but we do have our naming policy, which requires you to use a first and last name. Please head over here and fix yours, pronto. Thanks, pardner -- see you around the Ranch!