All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scala-finch.errors.mustache Maven / Gradle / Ivy

There is a newer version: 7.8.0
Show newest version
package {{packageName}}

/**
 * The parent error from which most API errors extend. Thrown whenever something in the api goes wrong.
 */
abstract class CommonError(msg: String) extends Exception(msg) {
  def message: String
}

/**
 * Thrown when the object given is invalid
 * @param message An error message
 */
case class InvalidInput(message: String) extends CommonError(message)

/**
 * Thrown when the given object is missing a unique ID.
 * @param message An error message
 */
case class MissingIdentifier(message: String) extends CommonError(message)

/**
 * Thrown when the given record does not exist in the database.
 * @param message An error message
 */
case class RecordNotFound(message: String) extends CommonError(message)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy