java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.github.sugarcubes.cloner.ClonerException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
UncopyableObjectException
Generic cloner exception. Wraps all exception during cloning process.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionClonerException(String message) Constructor with message.ClonerException(String message, Throwable cause) Constructor with message and cause.ClonerException(Throwable cause) Constructor with cause. -
Method Summary
Modifier and TypeMethodDescriptionIf the cause has the specified type then rethrowsClonerExceptionwith another message.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ClonerException
Constructor with message and cause.- Parameters:
message- messagecause- original exception
-
ClonerException
Constructor with cause.- Parameters:
cause- original exception
-
ClonerException
Constructor with message.- Parameters:
message- message
-
-
Method Details
-
replaceIf
If the cause has the specified type then rethrowsClonerExceptionwith another message.- Parameters:
causeType- cause typemessage- new message supplier- Returns:
- same exception
-