Skip to content

Instantly share code, notes, and snippets.

@Daniel-Jacob
Created March 11, 2022 14:22
Show Gist options
  • Save Daniel-Jacob/7ba9c625c3afc0fa5ee0f3a8fa6bf8c1 to your computer and use it in GitHub Desktop.
Save Daniel-Jacob/7ba9c625c3afc0fa5ee0f3a8fa6bf8c1 to your computer and use it in GitHub Desktop.
sealed class Error {
data class ValidationError(val id: Long, val message: String): Error()
data class IOError(val message: String, val throwable: Throwable): Error()
object FatalError : Error()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment