Skip to content

Instantly share code, notes, and snippets.

@eleinadani
Last active May 11, 2020 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eleinadani/c786182306fd68e248db1658f9610c0f to your computer and use it in GitHub Desktop.
Save eleinadani/c786182306fd68e248db1658f9610c0f to your computer and use it in GitHub Desktop.
public class ThenableObject {
void then(Value resolve, Value reject) {
try {
Object someResult = computeSomething();
resolve.executeVoid(someResult);
} catch (Throwable t) {
reject.executeVoid(t);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment