Are you aware of Either, if yes then you must know how it’s use for error handling , but don’t you think things get messy when it is placed into effectful types such as Option or Future, a large amount of boilerplate is required to handle errors.
In our previous blog Exception Handling – #2, we talked about how we can handle exception using Either. In this blog, we will explore further about Either, how we can elegantly handle exceptions using Either while working with Collections. We use collections when we want to perform some operations on elements. But what if something goes wrong while performing the transformation, do you have any Continue Reading
In our previous blog, we have seen how we can handle exceptions using try/catch and Try block. In this blog, we will explore how we can handle exceptions using Either. Either, just like a Try, is also a container type which can have one value either Left or Right at a time. We can also use Option to handle exceptions but if an exception occurs returning Continue Reading