Module utility.domain.exception
Class PersistenceException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
uk.co.jasonmarston.kiunzi.utility.domain.exception.DomainException
uk.co.jasonmarston.kiunzi.utility.domain.exception.PersistenceException
- All Implemented Interfaces:
Serializable
Exception thrown when a persistence operation cannot be completed.
Wraps infrastructure-level persistence failures and translates them into a domain exception so that the domain layer remains independent of any specific persistence technology.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPersistenceException(String message) Constructs aPersistenceExceptionwith the given detail message.PersistenceException(String message, Throwable cause) Constructs aPersistenceExceptionwith the given detail message and cause. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
PersistenceException
Constructs aPersistenceExceptionwith the given detail message.- Parameters:
message- the detail message describing the persistence failure
-
PersistenceException
Constructs aPersistenceExceptionwith the given detail message and cause.- Parameters:
message- the detail message describing the persistence failurecause- the underlying cause
-