New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add throws annotation FPromiseHelper#get #1227
add throws annotation FPromiseHelper#get #1227
Conversation
play2-master-PRs #247 SUCCESS |
Not sure about this. I think I'd rather document that it throws a TimeoutException. |
try {
promise.get();
} catch (TimeoutException e){
//error handling
} The above is compile error, because try {
promise.get();
} catch(Throwable e){
if (e instanceof TimeoutException){
//error handling
}
} |
I think the best solution is if get() threw an unchecked exception, but that would be an API change. (Adding a throws annotation is an API change too.) |
Let's make it throw an unchecked exception, create a new TimeoutException class that extends RuntimeException, and wraps TimeoutException thrown by |
@kamekoopa are you able to do this? |
@jroper I feel good your idea. I made an attempt to make modifications perform the its idea in a framework side. |
@kamekoopa It seems I missed your last comment 7 months ago. The changes you've made are good, except for one thing, the There's also been extensive refactoring of If you're not in a position to be able to do these updates, just let me know. |
Wrapped the TimeoutException of `Promise#get()` in the unchecked exception for timeout handling.
Hi @kamekoopa, Thank you for your contribution! We really value the time you've taken to put this together. Before we proceed with reviewing this pull request, please sign the Typesafe Contributors License Agreement: |
@jroper Thank you for replying! According to your comment, I performed rebase and squash of commits. |
@typesafehub-validator I had signed the CLA. |
add throws annotation FPromiseHelper#get
add throws annotation.
Promise#get()
throws TimeoutException, but can't know it from java api.excepion handling is inconvenience.