Brian Slesinsky has posted comments on this change.
Change subject: Introduces GWT#reportUncaughtException and
GWT#setUncaughtExceptionHandlerForTest.
......................................................................
Patch Set 1:
(6 comments)
....................................................
Commit Message
Line 9: Also this enables unit test frameworks to set an uncaught exception
handler without interfering with the user/production one. A following patch
will make the changes necessary to utilize new
GWT#setUncaughtExceptionHandlerForTest.
line too long
....................................................
File user/src/com/google/gwt/core/client/GWT.java
Line 180: * callbacks, timers, and RPC.
Can we keep the reference to DOM.dispatchEvent as an example?
Line 184: public static void reportUncaughtException(Throwable t) {
perhaps "maybeReportUncaughtException"?
Line 188: if (uncaughtExceptionHandlerForTest != null) {
It might be a bit more reliable to report it to the test framework first,
in case there's an exception in the other uncaught exception handler.
Maybe something like this:
interface TestExceptionHandler {
onUncaughtException(Throwable t, UncaughtExceptionHandler nextHandler);
}
if (testHandler != null) {
testHandler.onUncaughtException(t, uncaughtExceptionHandler);
} else if (uncaughtExceptionHandler != null) {
...
}
In the test harness, we could call the original handler (if any) and catch
the exception in the handler (if any) and report it.
Line 299: public static void setUncaughtExceptionHandlerForTest(
Do we really want this to be a public API? We could make it private to
GWTTestCase by making it default access here and putting a public method in
a less used class, perhaps in Impl or a new GwtTestApi class.
....................................................
File user/src/com/google/gwt/core/client/impl/AsyncFragmentLoader.java
Line 3: *
Could you avoid reformatting trailing whitespace in this CL? It makes the
diffs smaller and you probably don't want your name to show up on those
lines in 'annotate', or at least not yet.
--
To view, visit https://gwt-review.googlesource.com/1820
To unsubscribe, visit https://gwt-review.googlesource.com/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I7c25b8de334ef24c4795efdbb76023e0825136bb
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan <[email protected]>
Gerrit-Reviewer: Brian Slesinsky <[email protected]>
Gerrit-Reviewer: Ray Cromwell <[email protected]>
Gerrit-HasComments: Yes
--
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
---
You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.