//package crowdedroom.hop4droid;
import static java.text.MessageFormat.format;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
/**
* The Class Util.
*/
public class Util {
/**
* Serialize throwable.
* @param throwable the throwable
* @return the string
*/
public static String serializeThrowable(final Throwable throwable) {
final StringBuilder builder = new StringBuilder();
builder.append("");
builder.append("");
builder.append(""
+ throwable.getClass().getName()
+ " ");
builder.append(""
+ throwable.getMessage()
+ " ");
builder.append("");
for (final StackTraceElement element : throwable.getStackTrace()) {
builder.append(format(
" ",
element.getClassName(),
element.getFileName(),
element.getLineNumber(),
element.getMethodName()));
}
builder.append(" ");
builder.append(" ");
builder
.append("/root env ");
builder.append("");
return builder.toString();
}
}