public static String toString(String msg, Throwable e) {
        StringWriter w = new StringWriter();
        w.write(msg + "\n");
        PrintWriter p = new PrintWriter(w);
        try {
            e.printStackTrace(p);
            return w.toString();
        } finally {
            p.close();
        }
    }
@author Robert HG (254963746@qq.com) on 7/24/14.
lts-core/src/main/java/com/github/ltsopensource/core/commons/utils/StringUtils.java