Package io.permazen
Class UpgradeConversionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.permazen.core.DatabaseException
io.permazen.UpgradeConversionException
- All Implemented Interfaces:
Serializable
Exception thrown when an object is upgraded, some simple field's type changes, the field is
configured with
UpgradeConversionPolicy.REQUIRE
,
and automated conversion of the field's value to the new type fails.-
Constructor Summary
ConstructorDescriptionUpgradeConversionException
(ObjId id, String fieldName, String message) Constructor.UpgradeConversionException
(ObjId id, String fieldName, String message, Throwable cause) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGet the name of the field from which the old value could not be converted.getObjId()
Get the ID of the object containing the field whose value could not be converted.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
UpgradeConversionException
Constructor.- Parameters:
id
- ID of the object being upgradedfieldName
- the name of the fieldmessage
- exception message
-
UpgradeConversionException
Constructor.- Parameters:
id
- ID of the object being upgradedfieldName
- the name of the fieldmessage
- exception messagecause
- underlying exception, or null if none- Throws:
IllegalArgumentException
- ifid
orfieldName
is null
-
-
Method Details
-
getObjId
Get the ID of the object containing the field whose value could not be converted.- Returns:
- object ID
-
getFieldName
Get the name of the field from which the old value could not be converted.- Returns:
- the name of the field
-