in src/android/FileTransfer.java [609:634]
private static JSONObject createFileTransferError(int errorCode, String source, String target, String body, Integer httpStatus, Throwable throwable) {
JSONObject error = null;
try {
error = new JSONObject();
error.put("code", errorCode);
error.put("source", source);
error.put("target", target);
if(body != null)
{
error.put("body", body);
}
if (httpStatus != null) {
error.put("http_status", httpStatus);
}
if (throwable != null) {
String msg = throwable.getMessage();
if (msg == null || "".equals(msg)) {
msg = throwable.toString();
}
error.put("exception", msg);
}
} catch (JSONException e) {
LOG.e(LOG_TAG, e.getMessage(), e);
}
return error;
}