Skip to content

Instantly share code, notes, and snippets.

@supermanue
Last active May 3, 2020 09:59
Show Gist options
  • Save supermanue/2856749b38f6f8dcaddc989f8f0289a2 to your computer and use it in GitHub Desktop.
Save supermanue/2856749b38f6f8dcaddc989f8f0289a2 to your computer and use it in GitHub Desktop.
refined_7
sealed trait BusinessLogicError {val msg: String}
case class NonExistingSchema(name: String, namespace: String) extends BusinessLogicError {
override val msg: String = s"schema with name $name and namespace $namespace does not exist"
}
case class StorageError(schema: Schema) extends BusinessLogicError {
override val msg: String = s"schema ${schema.toString} could not be stored for whatever reason"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment