Skip to content

Commit 8f92f07

Browse files
Merge pull request #11 from SendSafely/v3.1.3
v3.1.3
2 parents 7559a3e + 45986f3 commit 8f92f07

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

SendSafelyAPI/src/com/sendsafely/handlers/GetDropzoneRecipientHandler.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import com.sendsafely.exceptions.RecipientFailedException;
1414
import com.sendsafely.exceptions.SendFailedException;
1515
import com.sendsafely.upload.UploadManager;
16-
import com.sun.xml.internal.ws.util.StringUtils;
1716

1817
public class GetDropzoneRecipientHandler extends BaseHandler {
1918

SendSafelyAPI/src/com/sendsafely/utils/SendUtil.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import java.io.IOException;
44
import java.io.InputStream;
5+
import java.io.PrintWriter;
6+
import java.io.StringWriter;
57
import java.util.HashMap;
68

79
import com.google.gson.Gson;
@@ -68,6 +70,12 @@ protected <T> T handleResponse(T clazz) throws IOException, SendFailedException
6870
hashMap.put("responseCode", Integer.toString(responseCode));
6971
hashMap.put("responseMessage", connection.getResponseMessage());
7072
hashMap.put("responseBody", response);
73+
hashMap.put("exceptionClass", e.getClass().toString());
74+
hashMap.put("exceptionMessage", e.getMessage());
75+
StringWriter sw = new StringWriter();
76+
PrintWriter pw = new PrintWriter(sw);
77+
e.printStackTrace(pw);
78+
hashMap.put("exceptionTrace", sw.toString());
7179
Gson gson = new GsonBuilder().serializeNulls().create();
7280
String jsonString = gson.toJson(hashMap);
7381
throw new SendFailedException(jsonString);

0 commit comments

Comments
 (0)