a.java
2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package com.instabug.library.util.a;
import android.support.annotation.Nullable;
import android.util.Log;
import com.instabug.library.util.InstabugSDKLogger;
import org.json.JSONException;
import org.json.JSONObject;
public class a
{
public static String a(Throwable paramThrowable)
{
return Log.getStackTraceString(paramThrowable);
}
public static JSONObject a(Throwable paramThrowable, @Nullable String paramString)
{
localJSONObject = new JSONObject();
try
{
String str = paramThrowable.getClass().getName();
Object localObject = str;
if (paramString != null) {
localObject = str + "-" + paramString;
}
localJSONObject.put("name", localObject);
str = null;
localObject = str;
if (paramThrowable.getStackTrace() != null)
{
localObject = str;
if (paramThrowable.getStackTrace().length > 0) {
localObject = paramThrowable.getStackTrace()[0];
}
}
if ((localObject != null) && (((StackTraceElement)localObject).getFileName() != null)) {
localJSONObject.put("location", ((StackTraceElement)localObject).getFileName() + ":" + ((StackTraceElement)localObject).getLineNumber());
}
for (;;)
{
localJSONObject.put("exception", paramThrowable.toString());
if (paramThrowable.getMessage() != null) {
localJSONObject.put("message", paramThrowable.getMessage());
}
localJSONObject.put("stackTrace", a(paramThrowable));
if (paramThrowable.getCause() == null) {
break;
}
localJSONObject.put("cause", a(paramThrowable.getCause(), paramString));
return localJSONObject;
InstabugSDKLogger.w(a.class, "Incomplete crash stacktrace, if you're using Proguard, add the following line to your configuration file to have file name and line number in your crash report:");
InstabugSDKLogger.w(a.class, "-keepattributes SourceFile,LineNumberTable");
}
return localJSONObject;
}
catch (JSONException paramThrowable)
{
paramThrowable.printStackTrace();
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/instabug/library/util/a/a.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/