Some code we have throws different exceptions during it's execution. I want to replace exceptions with Optional
; but optional can only inform users that value does not exist. I need more details about various issues that happens during the execution. I need this details mostly for the error messages and getting the right error code.
What is the intended way to use Optional
in this case?