Access the full course here: javabrains.io/courses/java_lambdabasics
This video proposes an alternative way of handling exceptions in lambdas. In the process we’ll also learn how to wrap lambda expressions in other lambda expressions!
49 Comments on "Java 8 Lambda Basics 18 – An Exception Handling Approach"
This tutorial just extract the exception handling code to wrap it in another method by chaining the lambda expression. It still looks a bit stupid and not elegant enough to me. Maybe it's the limitation of java syntax. Hope someone will figure out a better way to handle exception like this. And also, not mention the problem of cannot specify what exception coming from the consumer as we don't know yet.
So, essentially, this method of handling exceptions with lambdas is just for elegancy in the code? It is still really cool, I am just curious if anyone can clarify that for me.
Yours videos are amazing !!But I don't understand the use of wrapper lambda here. First of all you did not put try catch block in original lambda because it doesn't know about what operation Consumer brings in. The same thing will happen with wrapper lambda.
You skipped the point of what if the exception is not an ArithmeticException, Very confusing for learners and poor form.
I watched this video atleast 10 times to understand how the wrapper method is created. One of the best tutorials on Lambda I have seen on you tube. Hats Off to this guy. Explained everything in evolutionary way. Just Brilliant…
Why do u repeat so many times your explanations?!, it is a video, if someone didn't catch something and wants to hear/watch again and again something, just has to rewind it
In CodeChannels.com, you can learn to code by watching videos and stay up to date with latest code shows, events and tutorials aggregated from various leading developer communities.
Copyright 2016 By CodeChannels.com All rights reserved.