Last active
May 11, 2020 15:45
-
-
Save eleinadani/c786182306fd68e248db1658f9610c0f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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