commit | 2ca906f31463cfde26d5ba8ddd8a26c18cb28d0f | [log] [tgz] |
---|---|---|
author | Goktug Gokdogan <goktug@google.com> | Thu Apr 10 15:41:08 2014 -0700 |
committer | Goktug Gokdogan <goktug@google.com> | Wed Apr 16 22:38:53 2014 +0000 |
tree | 037e4815507f1f0be1a6b60a93975562ad1c1c97 | |
parent | 9c9acb60fe55a8368782bc5944481c8af004a4c4 [diff] |
Deprecates HttpThrowableReporter in favor of JsonLogRecordClientUtil. This helps us to drop XMLHttpRequest dep from core which makes it easier to avoid circular deps involving core. Change-Id: I21ef3393310c19112aeb904f4b970bc89ebbacaa (cherry picked from commit d94b402596302381061b72698bc706257307a4e7)
diff --git a/user/src/com/google/gwt/core/client/HttpThrowableReporter.java b/user/src/com/google/gwt/core/client/HttpThrowableReporter.java index 5088667..603f678 100644 --- a/user/src/com/google/gwt/core/client/HttpThrowableReporter.java +++ b/user/src/com/google/gwt/core/client/HttpThrowableReporter.java
@@ -21,7 +21,10 @@ /** * This is a utility class which can report Throwables to the server via a * JSON-formatted payload. + * + * @deprecated Use {@link JsonLogRecordClientUtil} instead. */ +@Deprecated public final class HttpThrowableReporter { private static class MyHandler implements UncaughtExceptionHandler {
diff --git a/user/src/com/google/gwt/logging/client/JsonLogRecordClientUtil.java b/user/src/com/google/gwt/logging/client/JsonLogRecordClientUtil.java index 1c9b153..b2224a6 100644 --- a/user/src/com/google/gwt/logging/client/JsonLogRecordClientUtil.java +++ b/user/src/com/google/gwt/logging/client/JsonLogRecordClientUtil.java
@@ -32,6 +32,10 @@ */ public class JsonLogRecordClientUtil { + public static String throwableAsJson(Throwable t) { + return throwableAsJsonObject(t).toString(); + } + public static String logRecordAsJson(LogRecord lr) { return logRecordAsJsonObject(lr).toString(); }