diff --git a/src/main/kotlin/com/project/movienight/domain/exception/BlockedValueException.kt b/src/main/kotlin/com/project/movienight/domain/exception/BlockedValueException.kt new file mode 100644 index 0000000..7555c0c --- /dev/null +++ b/src/main/kotlin/com/project/movienight/domain/exception/BlockedValueException.kt @@ -0,0 +1,6 @@ +package com.project.movienight.domain.exception + +class BlockedValueException( + target: String, + field: String, +) : DomainException("$target with this $field is not acceptable") diff --git a/src/main/kotlin/com/project/movienight/domain/exception/DomainException.kt b/src/main/kotlin/com/project/movienight/domain/exception/DomainException.kt new file mode 100644 index 0000000..aaa5dd4 --- /dev/null +++ b/src/main/kotlin/com/project/movienight/domain/exception/DomainException.kt @@ -0,0 +1,5 @@ +package com.project.movienight.domain.exception + +open class DomainException( + message: String, +) : RuntimeException(message) diff --git a/src/main/kotlin/com/project/movienight/domain/exception/EntityNotFoundException.kt b/src/main/kotlin/com/project/movienight/domain/exception/EntityNotFoundException.kt new file mode 100644 index 0000000..bce42d0 --- /dev/null +++ b/src/main/kotlin/com/project/movienight/domain/exception/EntityNotFoundException.kt @@ -0,0 +1,6 @@ +package com.project.movienight.domain.exception + +class EntityNotFoundException( + entity: String, + id: String, +) : DomainException("$entity with id $id not found")