Skip to content

Instantly share code, notes, and snippets.

@benweidig
Created May 16, 2020 17:08
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 benweidig/c131ed2205be88210eff7492120a448c to your computer and use it in GitHub Desktop.
Save benweidig/c131ed2205be88210eff7492120a448c to your computer and use it in GitHub Desktop.
Either<Integer, String> result = doWork();
result.apply(errorCode -> log.error("Error {} occuring during work", errorCode),
value -> log.info("Success: {}", value));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment