harness.sql.mock.error.MockError.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of harness-sql-mock_3 Show documentation
Show all versions of harness-sql-mock_3 Show documentation
Miscellaneous libraries/utilities for Scala.
The newest version!
package harness.sql.mock.error
sealed trait MockError extends Throwable {
override final def getMessage: String = this match {
case MockError.ConstraintViolationError(table, index, key) =>
s"Constraint violation for table $table on index $index, key: $key"
case MockError.MissingExpectedKeyError(table, key) =>
s"Expected single value in table $table for key: $key"
}
}
object MockError {
final case class ConstraintViolationError(table: String, index: String, key: Any) extends MockError
final case class MissingExpectedKeyError(table: String, key: Any) extends MockError
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy