Monday, June 8, 2009

GetStackTraceFromException

public static String GetStackTraceFromException(Exception e)
{
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);

return sw.toString();
}

No comments: