PrintWriter pw = null;
ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream();
pw = new PrintWriter(byteOutputStream, true);
e.printStackTrace(pw);
String exMessage = byteOutputStream.toString();
PrintWriter pw = null;
ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream();
pw = new PrintWriter(byteOutputStream, true);
e.printStackTrace(pw);
String exMessage = byteOutputStream.toString();