Skip to content
This repository was archived by the owner on Sep 26, 2020. It is now read-only.

Commit 4934a93

Browse files
author
steventg@google.com
committed
Sets the throwable's message when converting Json to LogRecord.
Review-Link: https://gwt-review.googlesource.com/#/c/2310/ git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@11609 8db76d5a-ed1c-0410-87a9-c151d255dfc7
1 parent 11399b4 commit 4934a93

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

user/src/com/google/gwt/logging/server/JsonLogRecordServerUtil.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,10 @@ private static Throwable fromJsonString(String jsonString) throws JSONException
5757
}
5858

5959
private String type;
60-
private String msg;
6160

6261
public JsonLogRecordThrowable(JSONObject t) throws JSONException {
62+
super(t.getString("message"));
6363
type = t.getString("type");
64-
msg = t.getString("message");
6564
setStackTrace(stackTraceFromJson(t.optJSONArray("stackTrace")));
6665
initCause(JsonLogRecordThrowable.fromJsonString(t.getString("cause")));
6766
}
@@ -88,7 +87,7 @@ private StackTraceElement stackTraceElementFromJson(String jsonString) throws JS
8887

8988
@Override
9089
public String toString() {
91-
return msg != null ? type + ": " + msg : type;
90+
return getMessage() != null ? type + ": " + getMessage() : type;
9291
}
9392
}
9493
}

0 commit comments

Comments
 (0)