Skip to content

Instantly share code, notes, and snippets.

@KalpaD
Created March 14, 2020 08:06
Show Gist options
  • Select an option

  • Save KalpaD/83f847e8702da413ad0d02a7f3a7134e to your computer and use it in GitHub Desktop.

Select an option

Save KalpaD/83f847e8702da413ad0d02a7f3a7134e to your computer and use it in GitHub Desktop.
private static void debuggingWithOutCheckpoints() {
List<String> nameList = Arrays.asList("Rochel", "April", "Hong");
Flux<String> stringFlux = Flux.fromIterable(nameList)
.distinct()
.map(name -> name.substring(0, 3))
.map(String::toUpperCase)
.map(name -> {
if (name.equals("HON")) {
throw new RuntimeException("Boom!");
} else {
return name;
}
});
stringFlux.subscribe(log::info);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment