Question

Hi Just going through GWT 2.5, came across ErrorHandler, which can be added to a widget which has implemented hasErrorHanlder. Can anyone help me in understanding.

I am trying to write new Custom widget by extending the Compoiste if i implement HasErrorHanlders interface it helps me to catch what ever errors occur in this class should be known to it usage class... may be i am wrong..?

Was it helpful?

Solution

It is a DOM event and not GWT widget event. It is fired or used only in some GWT internal cases for DOM related errors. I have seen only GWT Image class use this class.

It is of no use in Composite widgets as far i have come across. It would be interesting if we can find any other use case. Note: It is raised or triggered as DomEvent and is not triggered otherwise in GWT code.

Edit - Use Uncaught Exception Handler in GWT to handle such odd cases.

1) http://stackoverflow.com/questions/3028521/gwt-setuncaughtexceptionhandler
2) http://google-web-toolkit.googlecode.com/svn/javadoc/2.5/com/google/gwt/core/client/GWT.html#setUncaughtExceptionHandler(com.google.gwt.core.client.GWT.UncaughtExceptionHandler)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top