Thursday, February 26, 2015

Re: JSO: Why does this fail?

On Thursday, February 26, 2015 at 2:25:13 PM UTC+1, Mickaël Leduque wrote:
OK thanks, thant would be

    private static <B> Thenable<B> staticThen(Thenable<B> thenable, B arg) {
      return thenable.then(arg);

2015-02-26 13:41 GMT+01:00 Thomas Broyer <>:

BTW, you might want to add a bunch of calls to $entry() here and there.

I wondered about that.

I have seen mention of $entry in the doc, but never saw an actual documentation on what it does, when to use it and when not to use it.

Whenever you "enter GWT code" from the outside, wrap that function with $entry().
$entry() will decorate any function and make sure that:
  • exceptions are routed to the GWT.UncaughtExceptionHandler, if any.
  • scheduleEntry / scheduleFinally commands are run

function $entry(fn) {
  return function() {
    var _entry = function(fn, args) {
      try {
        fn.apply(this, args);
      } finally {
    if (hasUncaughtExceptionHandler) {
      try {
        _entry(fn, arguments);
      } catch (e) {
    } else {

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment