Created
June 15, 2017 06:56
-
-
Save anonymous/0b89aa7e6122f4e747891c8bb959cbb6 to your computer and use it in GitHub Desktop.
the description for this gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val detailedErrorA = Optional[Error, String]{ | |
case err: ErrorA => Some(err.details.detailedMessage) | |
case _ => None | |
}{ newDetailedMsg => from => | |
from match { | |
case err: ErrorA => err.copy(details = err.details.copy(newDetailedMsg)) | |
case _ => from | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment