Skip to content

javed0863/Either

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Either

This is a sample app to show the handling of checked exceptions which may occure during stream processing

'Either' Type Introduction

This type of Object is derived from scala.Either type. It can be used to represent a value which is either correct or an error.

Refer Exception Handling in Java Streams for more details.

Usage

Wrap the statements responsible for checked exceptions as below.

  • Use Either.lift() - This will just log the exception and continue processing the stream.
  • Use Either.liftWithValue - This will log both the exception and input parameter value (responsible for exception). Then it continues processing the stream.

Refer src/App.java for sample usages.

alt text

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages