Here you can find the source of getErrorInfo(Throwable error)
public static String getErrorInfo(Throwable error)
//package com.java2s; //License from project: Apache License import java.io.PrintWriter; import java.io.StringWriter; public class Main { public static String getErrorInfo(Throwable error) { try {/* ww w. j av a 2 s . c o m*/ StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); error.printStackTrace(pw); return sw.toString(); } catch (Exception e1) { return ""; } } }