Created
March 11, 2022 14:23
-
-
Save Daniel-Jacob/8f73599eb55a0785fafe116f2c5770f1 to your computer and use it in GitHub Desktop.
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
object ErrorHandler { | |
fun handleError(error: Error) = when(error) { | |
is ValidationError -> log.error("a validation error has occured") | |
is IOError -> log.error("an IO error has occured") | |
is FatalError -> log.error("a Fatal error has occured... exiting") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment