Reviewers: Ray Ryan,

Message:
Is there any reason to limit this to RuntimeException rather than
Exception?

I think it would be better to capture all exceptions thrown during event
dispatch and then re-throw them in an umbrella exception. This way it
will reach the app's UncaughtExceptionHandler through the usual
mechanisms without the developer having to think about it.

We do something similar when attaching and detaching Widgets, see
AttachDetachException. Don't mind its Command stuff, all you need to
imitate in, say, EventDispatchException are

AttachDetachException(Set<Throwable> causes)
public Set<Throwable> getCauses()

Really the thing to do is refactor out a common superclass, perhaps
UmbrellaException



http://gwt-code-reviews.appspot.com/136805/diff/1/2
File svn/user/src/com/google/gwt/event/shared/HandlerManager.java
(right):

http://gwt-code-reviews.appspot.com/136805/diff/1/2#newcode64
Line 64: } catch (RuntimeException e) {
Why limit to RuntimeException and not plain old Exception?

Description:
Adds a GWT.UncaughtExceptionHandler to HandlerManager that can handle
RuntimeExceptions thrown by event handlers.

Patch by: [email protected]

Please review this at http://gwt-code-reviews.appspot.com/136805

Affected files:
  M svn/user/src/com/google/gwt/event/shared/HandlerManager.java
  M svn/user/test/com/google/gwt/event/shared/HandlerManagerTest.java


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to