private static String getStackMsg(Throwable e) {
StringWriter sw=null;
PrintWriter pw=null;
String errorContent=null;
try{
sw = new StringWriter();
pw=new PrintWriter(sw, true);
e.printStackTrace(pw);
errorContent=sw.toString();
}finally{
try{
if(null!=pw){
pw.close();
}
if(null!=sw){
sw.close();
}
}catch(Exception ex){
logger.error("<<<<<<<<<".concat(ex.getMessage()), ex);
}
}
return errorContent;
}
StringWriter sw=null;
PrintWriter pw=null;
String errorContent=null;
try{
sw = new StringWriter();
pw=new PrintWriter(sw, true);
e.printStackTrace(pw);
errorContent=sw.toString();
}finally{
try{
if(null!=pw){
pw.close();
}
if(null!=sw){
sw.close();
}
}catch(Exception ex){
logger.error("<<<<<<<<<".concat(ex.getMessage()), ex);
}
}
return errorContent;
}