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(); }