* Initialize the event handlers for the host.
*/
private void init() {
breakyWorker.setOnError(new ErrorHandler() {
public void onError(ErrorEvent event) {
UncaughtExceptionHandler ueh = GWT.getUncaughtExceptionHandler();
if (ueh != null) {
try {
onBreakyException(event);
} catch (Exception ex) {
ueh.onUncaughtException(ex);
}
} else {
onBreakyException(event);
}
}
});
breakyWorker.setOnMessage(new MessageHandler() {
public void onMessage(MessageEvent event) {
UncaughtExceptionHandler ueh = GWT.getUncaughtExceptionHandler();
if (ueh != null) {
try {
fireOnBreakyMessage(event);
} catch (Exception ex) {
ueh.onUncaughtException(ex);
}
} else {
fireOnBreakyMessage(event);
}
}