Last active
September 24, 2015 14:18
-
-
Save cilquirm/31dad05e44af3b89c9c2 to your computer and use it in GitHub Desktop.
try example
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
Try.of( () -> somePotentiallyFatalOperation() ) | |
.recover( (x) -> { logger.error("oops:",x); throw x; }) | |
.orElse("Boo"); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You may use the onFailure method to peek a failure: