feat(domain): added domain exceptions
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
package com.project.movienight.domain.exception
|
||||
|
||||
class BlockedValueException(
|
||||
target: String,
|
||||
field: String,
|
||||
) : DomainException("$target with this $field is not acceptable")
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.project.movienight.domain.exception
|
||||
|
||||
open class DomainException(
|
||||
message: String,
|
||||
) : RuntimeException(message)
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.project.movienight.domain.exception
|
||||
|
||||
class EntityNotFoundException(
|
||||
entity: String,
|
||||
id: String,
|
||||
) : DomainException("$entity with id $id not found")
|
||||
Reference in New Issue
Block a user